2011-12-13 14 views
0

私のアプリケーションを実行しようとしましたが、Main.mファイルとこのログメッセージにシグナルSIGABRTがあります。助けて?ここでシグナル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

テーブルビューがあなたのコンセントに接続されていないようです。 – CodaFi

+0

またはxibが何らかの形で破損しています。 –

+0

テーブルビューをコンセントにどのように接続しますか? – BobbyTheElf

答えて

1

ホット・リックスで述べたように、私は同じ問題を見てきました。私のxibファイルが壊れました。たとえば、コントロールが複数のアクションに接続されている場合や、カップルのivarsと配線されている場合など、xibの破損を定義できます。明らかに、誤って。

xibファイルを確認するには、コントロールを右クリックして、複数の関連があるかどうかを確認するのが最も速いことです。

関連する問題