【发布时间】:2013-03-07 02:29:53
【问题描述】:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "2Pv-MD-gdY-view-bDF-TR-G6E" nib but didn't get a UITableView.'
我为什么会这样?我的应用程序的要点是我有一个 UITableViewController 和一个触发操作表的按钮。当按下特定选项时,操作表会呈现一个视图控制器(模态)。这是我的代码:
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *buttonTitle = [actionSheet buttonTitleAtIndex:buttonIndex];
if ([buttonTitle isEqualToString:@"Text"]) {
AddTextViewController *addTextViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"addTextViewController"];
[self presentViewController:addTextViewController animated:YES completion:nil];
}
}
我可以提供任何进一步需要的信息,但我不确定出了什么问题。
【问题讨论】:
-
AddTextViewController 是什么类型的?我假设它不是 UITableViewController。我假设在你的故事板 addTextViewController 是 UITableViewController
标签: ios objective-c storyboard uitableview uiactionsheet