0
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];
    }

}

我可以提供任何进一步需要的信息,但我不确定出了什么问题。

4

2 回答 2

0

看起来您正在尝试实例化一个 nib 并且它不存在。笔尖是否包含在项目成员中?

于 2013-03-19T06:32:28.300 回答
0

您是否在 xib 中为此表视图控制器创建了视图?您可能只需要将 xib 文件中的 tableView 属性连接到 tableView。

于 2013-03-18T17:21:51.157 回答