0
我有一個UITableViewController作爲我的標籤欄控制器的第二個選項卡上的視圖控制器之一。UITableViewController detailView從未推
在didSelectRowAtIndexPath
我創建了一個詳細的視圖控制器,但它從來沒有被推到導航堆棧上...並且應用程序也不會崩潰,因爲我可以在調用pushViewController
之後調用NSLog。
這是方法:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
KeyboardViewController *v = [[KeyboardViewController alloc] initWithNibName:@"KeyboardView" bundle:nil];
[self.navigationController pushViewController:v animated:YES];
NSLog(@"gets here OK");
}
什麼會導致此?當然,如果navigationController不存在,那麼它會崩潰?由於這是一個UITableViewController,它應該自動創建,如果它不是?
感謝
奇怪...你確定一切都存在的方式應該??嘗試使用該方法的斷點進行調試...因此,您會看到分配的內容以及哪些不是... – dododedodonl 2010-08-13 12:15:33