how do you write a title or add a barbuttonitem in the navigation bar with a split view controller-based project?
i tried self.navi开发者_运维问答gationItem.title = @"allo";
in viewDidLoad, but only the popover button is shown in the nav bar.
Am i missing something?
Thanks
Look in the detail view controller for this method.
- (void)splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController: (UIPopoverController *)pc
You can add a UIBarButtonItem to the items array that the above method provides. Also take a look at this link Fixing the UISplitViewController Template
It will show you how to further customize the stock UISplitViewController template.
精彩评论