UISplitViewController in portrait: how to hide master popover programmatically?

前端 未结 3 1750
执笔经年
执笔经年 2020-12-14 23:01

In my UISplitViewController the master controller is a UINavigationController. When in portrait mode I would like to keep the navigation controller

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-14 23:15

    The IOS 6.0 SplitView template has this built in. The detail view tracks the orientation and the MasterViewController popover.

    Simply set the detailItem and the popover disappears if appropriate. There is even a check if you are using the same detaiItem so no page setup and refresh work gets done.

    self.detailViewController.detailItem = self.detailViewController.detailItem;
    

提交回复
热议问题