1
我有一個標籤欄項目。當從第一視角,我打電話與COMAND第二個觀點:導航欄中的後退按鈕不會出現
- (IBAction) button
{
[[self navigationController] pushViewController:secondView animated:YES];
}
第二視圖包含不具有「編輯模式」表視圖:
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
// Return NO if you do not want the specified item to be editable.
return NO;
}
但是當第二個視圖出現在欄中的頂部不會出現「後退」按鈕,但會出現「編輯」按鈕。在第一視圖中,viewDidAppear
我有:
- (void)viewDidAppear:(BOOL)animated{
self.navigationItem.backBarButtonItem =
[[[UIBarButtonItem alloc] initWithTitle:@"Back"
style:UIBarButtonItemStyleBordered
target:nil
action:nil] autorelease];
}
我該怎麼辦?感謝您的幫助
但我在第一個視圖上有此代碼。第一個視圖用tableview調用第二個視圖,這是帶有問題的視圖。 – gabboSonc 2013-04-29 07:13:17
我不知道你的代碼中發生了什麼,我在我的項目中檢查了這個 - 在ios6.1 xcode 4.6 – Stas 2013-04-29 08:01:54
下工作100%也許在xib文件中有錯誤?要檢查或設置的東西?第二個視圖有一個tableview,它調用'tableviewcell'來填充單元格。 – gabboSonc 2013-04-29 08:10:58