我目前正在编写一个主要基于UITableViewControllers的iOS应用程序。层次结构如下:
AppDelegate -> UINavigationController -> UITableViewController A -(didSelectRow: presentModalVC)-> UITabBarController -(包含多重) -> UINavigationController -> UITableViewController B
现在,当我试图在navigationItem方法中的UITableViewController B中添加一个viewDidLoad时,如下所示:
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCompose target:self action:@selector(composeTweet:)];navigationItem不显示。
发布于 2012-08-26 14:14:30
试试self.navigationController.navigationItem.rightBarButtonItem
另外,尝试使用NSLogging UINavigationController来查看它是否为零。
https://stackoverflow.com/questions/12130752
复制相似问题