1
以下代碼發生錯誤---終止應用程序由於未被捕獲 異常'NSInternalInconsistencyException' ,原因是:「不能在包中加載 NIB:異常'NSInternalInconsistencyException',原因:'無法加載捆綁中的NIB:...可以找人發現有什麼問題
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
DetailViewController *dvc =[[DetailViewController alloc]initWithNibName:@"DetailViewController" bundle:nil];
dvc.index = indexPath.row;
[self.navigationController pushViewController:dvc animated:YES];
}
是包含在你的目標筆尖文件(檢查Xcode右側的文件屬性窗格,並確保該框被選中)? – par
提到這個名字是propabrly,例如DetailViewController.xib –
檢查這個 - http://stackoverflow.com/questions/5337337/could-not-load-nib-in-bundle – Rajat