在基於導航的應用程序,當我試圖加載已得到使用initWithNibName
實現UITableView
另一種觀點認爲:點擊UITableView
細胞後問題與裝載的UITableView導航爲基礎的應用程序
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UIViewController *detailsViewController = [[UIViewController alloc] initWithNibName:@"bloop2ViewController" bundle:nil];
[[self navigationController] pushViewController:detailsViewController animated:YES];
[detailsViewController release];
}
我得到:
2009-06-13 11:44:41.089 Bloop[75227:20b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0xd446f0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tableView.' 2009-06-13 11:44:41.092 Bloop[75227:20b] Stack: (
807902715, 2429103675, 808061681, 810717848, 810716389, 816538544, 807805711, 816533170, 816541363, 815230552, 815224116, 815223834, 815217291, 815258907, 815254969, 815262662, 815243017, 815265053, 815242666, 11044, 815018240, 815005661, 810768858, 807687328, 807683624, 839142449, 839142646, 814752238, 9088, 8942 )
但是,當我在InterfaceBuilder中斷開UITableView
時,視圖加載沒有任何問題(除了沒有辦法將數據推入它)。
UITableView的實現是正確的 - 我嘗試了一個新的XCode項目,它工作得很好。
就像一個魅力......我花了整整一天的跟蹤下來,我認真欠你:) 再次感謝,並保重! – 2009-06-13 13:49:15