如何在弹出控制器中设置带标题的导航栏?我想详细解释,请帮帮我。 提前谢谢。
答案 0 :(得分:6)
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类中编写
self.title = @"Text For Title on Navigation Bar";