如何在弹出控制器中设置带标题的导航栏

时间:2011-07-28 04:26:03

标签: ipad

如何在弹出控制器中设置带标题的导航栏?我想详细解释,请帮帮我。 提前谢谢。

1 个答案:

答案 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";