开发者

navigationItem.title does not exist? with splitviewcontroller (ipad)

开发者 https://www.devze.com 2023-04-04 16:21 出处:网络
how do you write a title or add a barbuttonitem in the navigation bar with a split view controller-based project?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消