BTNavigationDropdownMenu icon indicating copy to clipboard operation
BTNavigationDropdownMenu copied to clipboard

call from UISplitViewController

Open sagits opened this issue 8 years ago • 0 comments

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: image

Chaging the width without the /2 image

Chaging the width with the /2 image

sagits avatar Mar 22 '16 02:03 sagits