我想在iPad上显示displayModeButtonItem。我有这段代码:
self.navigationItem.leftBarButtonItem = self.splitViewController.displayModeButtonItem;
self.navigationItem.leftItemsSupplementBackButton = YES;
帮助!!!
答案 0 :(得分:0)
创建自定义UISplitViewController,并实现委托
class PrimarySplitViewController: UISplitViewController,
UISplitViewControllerDelegate {
override func viewDidLoad() {
self.delegate = self
}
func splitViewController( _ splitViewController: UISplitViewController,
collapseSecondary secondaryViewController: UIViewController,
onto primaryViewController: UIViewController) -> Bool {
return true
}
}