我有一个与 iOS 5.1 或更高版本兼容的 iPad 应用程序。我正在为 iOS 7 更新应用程序。我遇到了这个问题:我在 UITabBarController 中有一个 UINavigationController。我想添加 rightBarButtonItems。可以看到 iOS 6 或更低版本,但 iOS 7 没有。我错了什么?
PS:我被迫让app兼容iOS 5.1,因为有些客户还在使用第一代iPad,所以我不能使用AutoLayout。我是 XIB,因为这个项目已经很老了,而且我还没有重写代码。
谢谢!!
为 Nikos M 编辑。
self.navigationItem.rightBarButtonItems = @[...];
图片:http: //i.stack.imgur.com/RB3Rc.png
编辑2:
我曾尝试在导航栏上添加自定义视图:
//I added this line otherwise I not see the Navigation Bar!!
[self.navigationController.navigationBar setFrame:CGRectMake(0, 0, 320, 132)];
[self.navigationController.navigationBar addSubview:[self addTableHeader]];
这就是结果!