我有問題獲取使用pushViewController加載的詳細視圖。起初,我認爲pushViewController沒有工作。但是,然後我嘗試使用不同的視圖控制器,它工作。我可以從跟蹤中得知,問題視圖控制器從來沒有加載過。換句話說,我試圖通過NSLoging消除在視圖控制器中出現錯誤的可能性,並且我從來沒有看到任何東西。iPhone SDK:pushViewController崩潰
有沒有人有任何想法?
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
/*
NSLog(@"hsitkjsdfkljlkd");
if (childController == nil)
childController = [[salesViewController alloc] initWithNibName:@"salesView" bundle:nil];
//NSUInteger row = [indexPath row];
[self.navigationController pushViewController:childController
animated:YES];
*/
/*
//modal = blocking
salesViewController *otherVC = [[salesViewController alloc] initWithNibName:@"salesView" bundle:nil];
//must set sale type
otherVC.strSaleType = @"Voice";
[self presentModalViewController: otherVC animated:YES];
//No close. By design, it is up to the otherVC to close itself
*/
//tipCalcViewController *detailViewController = [[tipCalcViewController alloc] initWithNibName:@"tipCalcView" bundle:nil];
salesViewController *detailViewController = [[salesViewController alloc] initWithNibName:@"salesView" bundle:nil];
// ...
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
}
您是否在控制檯崩潰時看到任何錯誤消息? – Vladimir 2010-09-17 16:04:01
以上,加上,你確定你指定的筆尖名稱是正確的? – 2010-09-17 16:10:04
沒有控制檯消息。筆尖的名字也是正確的。如何解決問題? – butchcowboy 2010-09-17 17:47:16