开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜