2011-12-13 72 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

好像你的tableView沒有連接到你的插座。 – CodaFi 2011-12-13 21:29:30

回答

1

。我的xib文件被損壞了。你可以定義xib的腐敗,例如,一個控件連接到多個動作,或者連接幾個ivars。顯然,是錯誤的。

最快的事情來檢查你的xib文件,右鍵單擊控件,看看它是否有多個關聯。