我有一個使用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];
}
它做工精細的新項目。按鈕點擊。調用選擇器。但按鈕看起來像是無效(灰色)。標題也是灰色的。爲什麼?
我需要做些什麼來給他們一個標準的佈局?
哪個按鈕?編輯按鈕?或添加按鈕? – richerd
同時編輯和添加標題。 –
你可以截圖並附加到你的文章,我沒有看到你的代碼有什麼問題。 – richerd