Skip to content

Commit

Permalink
Fix dropdown position
Browse files Browse the repository at this point in the history
  • Loading branch information
xuning0 committed Oct 5, 2020
1 parent 750f26a commit 87aa356
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 87aa356

Please sign in to comment.