【发布时间】:2011-10-20 12:46:02
【问题描述】:
我有一个带有 splitViewController 的 iPad 应用程序。在我的 RootViewController 我添加按钮来编辑项目列表并添加新项目
- (void)viewDidLoad
{
[super viewDidLoad];
self.clearsSelectionOnViewWillAppear = NO;
self.contentSizeForViewInPopover = CGSizeMake(320.0, 500.0);
// Configure the Edit button
[[self navigationItem] setLeftBarButtonItem:[self editButtonItem]];
// Configure the Add button
UIBarButtonItem * addButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
target:self
action:@selector(add)];
[[self navigationItem] setRightBarButtonItem:addButton];
[addButton release];
}
它工作正常。按钮轻按。调用选择器。但是按钮看起来像是处于非活动状态(灰色)。标题也是灰色的。为什么?
我需要做些什么来给他们一个标准的布局?
【问题讨论】:
-
哪个按钮?编辑按钮?还是添加按钮?
-
编辑和添加以及标题。
-
你能截图并附在你的帖子上吗,我看不出你的代码有什么问题。
-
这里是屏幕截图的链接pics.livejournal.com/torgvi/pic/000cd6kr 我无法将其附加到帖子中,因为我没有足够的声望点,抱歉。
-
这实际上是 iPad 分屏控制器的正确默认颜色
标签: objective-c ios xcode uinavigationitem