Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming
by Maurice Sharp, Erica Sadun, Rod Strougo
Accessing the Menu in Portrait
You can access the main/menu controller of a split view in portrait in one of two ways: always show the controller, as the Settings app does, or show a menu popover button for opening the menu, as in Mail and Notes. Either way requires implementing one or more methods of the UISplitViewControllerDelegate protocol.
All the methods support some stage of showing or hiding a menu popover. Always showing the menu is the simplest: You just return NO from splitViewController:shouldHideViewController:inOrientation:.
CarValet hides the menu in portrait, so you need a few more methods. What class do you use for the delegate? The Apple Xcode samples tend to use the detail view controller as the delegate. Other possibilities ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access