From 87aa35671f5e245c068339a98bf8b0fbf3098c5c Mon Sep 17 00:00:00 2001 From: XuNing Date: Mon, 5 Oct 2020 14:32:23 +0800 Subject: [PATCH] Fix dropdown position --- .../Presentation/Dropdown/DropdownPresentationController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Presentation/Dropdown/DropdownPresentationController.swift b/Sources/Presentation/Dropdown/DropdownPresentationController.swift index ef496041..a45cbd6c 100644 --- a/Sources/Presentation/Dropdown/DropdownPresentationController.swift +++ b/Sources/Presentation/Dropdown/DropdownPresentationController.swift @@ -66,7 +66,7 @@ class DropdownPresentationController: UIPresentationController { // We can't use the frame directly since iOS 13 new modal presentation style let navigationRect = navigationBar.convert(navigationBar.bounds, to: nil) let presentingRect = presentingView.convert(presentingView.frame, to: containerView) - position = CGPoint(x: presentingRect.origin.x, y: presentingRect.origin.y + navigationRect.height) + position = CGPoint(x: presentingRect.origin.x, y: navigationRect.maxY) // Match color with navigation bar presentedViewController.view.backgroundColor = navigationBar.barTintColor