BTNavigationDropdownMenu
BTNavigationDropdownMenu copied to clipboard
call from UISplitViewController
Hi, i an using two storyboards, one for iphone and one for ipad (this one is always in landscape). I`m changing line 218+ from BTNavigationDropDownMenu, checking if my UINavigationController has a parent UISplitViewController, and changing the menuWrapperBounds origin x based on the masterViewController (my menu) frame.
It worked, but i had to split my masterViewController size by 2 and i cant understand why this is needed, can you help me please?
the code:
var menuWrapperBounds = window.bounds
if let uISplitViewController = navigationController.parentViewController as? UISplitViewController {
let splitWidth = uISplitViewController.viewControllers[0].view.bounds.size.width
menuWrapperBounds.origin.x = splitWidth / 2 // why the /2 is needed?
// menuWrapperBounds.size.width = menuWrapperBounds.size.width - splitWidth
}
Without changing the width:
Chaging the width without the /2
Chaging the width with the /2