我收到SIGABRT信号和日志信息

时间:2011-12-13 21:28:17

标签: ios xcode uitableview dictionary sigabrt

我尝试运行我的应用程序,并在Main.m文件和此日志消息中收到信号SIGABRT。帮助

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-     [UITableViewController loadView] loaded the "5wY-6u-SFr-view-Zew-TR-1Cy" nib but didn't get a UITableView.'
*** First throw call stack:
(0x15d3052 0x1764d0a 0x157ba78 0x157b9e9 0x2536ae 0xea5cb 0xf358c 0xee3e8 0x307cc5 0xf1427      0xf158c 0xb6f5280 0xf15cc 0x4546b6 0x448e30 0x15d4ec9 0x275c2 0x2755a 0xccb76 0xcd03f 0xcc2fe    0x4ca30 0x4cc56 0x33384 0x26aa9 0x14bdfa9 0x15a71c5 0x150c022 0x150a90a 0x1509db4 0x1509ccb    0x14bc879 0x14bc93e 0x24a9b 0x1d42 0x1cb5)
terminate called throwing an exception

以下是我的表格视图的代码:

}

-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return [self.menu count];
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell =[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }

    cell.textLabel.text = [[self.menu objectAtIndex:indexPath.row]objectForKey:@"Title"];
        return cell;

}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *__strong)indexPath {
    DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"detailViewController"bundle:nil];
    OrderViewController *orderViewController = [[OrderViewController alloc] initWithNibName:@"orderViewController"bundle:nil];    
    detailViewController.item = [self.menu objectAtIndex:indexPath.row];
    orderViewController.itemString = [self.menu objectAtIndex:indexPath.row];
    [self.navigationController pushViewController:detailViewController animated:YES];
}

1 个答案:

答案 0 :(得分:1)

我看到Hot Licks提到的同样问题。我的xib文件已损坏。您可以定义xib的损坏,例如,控件连接到多个操作,或连接几个ivars。显然是错误的。

检查xib文件最快的事情,右击控件并查看它是否有多个关联。