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 ...

Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.