Skip to content

Commit 296d274

Browse files
committed
fix ipad layout bug
1 parent a3b1220 commit 296d274

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

DropdownMenu/DropdownMenu.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ open class DropdownMenu: UIView {
122122
var topOffset: CGFloat
123123
switch oriention {
124124
case UIInterfaceOrientation.landscapeLeft.rawValue, UIInterfaceOrientation.landscapeRight.rawValue:
125-
topOffset = landscapeTopOffset
125+
if UIDevice.current.userInterfaceIdiom == .phone {
126+
topOffset = landscapeTopOffset
127+
} else {
128+
topOffset = navigationController.navigationBar.frame.height + UIApplication.shared.statusBarFrame.height
129+
}
126130
default:
127131
topOffset = portraitTopOffset
128132
}

0 commit comments

Comments
 (0)