本文介绍了如何在弹出控制器中设置带标题的导航栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在弹出控制器中设置带标题的导航栏?我想详细解释,请帮帮我。
提前致谢。
How do you set a navigation bar with a title in a popover controller? I want a detailed explanation, please help me.Thanks in advance.
推荐答案
SomeViewController *popContentViewController = [[SomeViewController alloc] initWithNibName:@"SomeViewController" bundle:nil];
UINavigationController *controller = [[UINavigationController alloc] initWithRootViewController:popContentViewController];
UIPopoverController popOverController = [[UIPopoverController alloc] initWithContentViewController:controller];
popOverController.delegate = self;
[popContentViewController release];
[controller release];
并且在viewDidLoad方法中的SomeViewController类中写
And in SomeViewController Class in viewDidLoad method write
self.title = @"Text For Title on Navigation Bar";
这篇关于如何在弹出控制器中设置带标题的导航栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!