我已从故事板中删除了UITableView并以编程方式创建了它。
我得到以下错误:
Could not load NIB in bundle: 'NSBundle </Users/zontragon/Library/Application Support/iPhone Simulator/7.1/Applications/478xxxx-AAxx-4xxx-90xx-7019xxxxx/album.app> (loaded)' with name 'tsO-ri-Bhf-view-e5d-Av-Ufv''
*** First throw call stack:
(
0 CoreFoundation 0x030701e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x02def8e5 objc_exception_throw + 44
2 CoreFoundation 0x0306ffbb +[NSException raise:format:] + 139
3 UIKit 0x0218ab7b -[UINib instantiateWithOwner:options:] + 951
4 UIKit 0x01ff36f5 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
5 UIKit 0x01ff3e9d -[UIViewController loadView] + 302
6 voguedrobe 0x00020da0 -[VDMultiCategoryAlbumViewController loadView] + 64
我创建了它,如下所示:
// It gives exception below line.
self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
[self.tableView setAutoresizingMask:UIViewAutoresizingFlexibleBottomMargin|UIViewAutoresizingFlexibleWidth];
[self.tableView setDataSource:self];
[self.tableView setDelegate:self];
[self.view addSubview:self.tableView];
如果有剩余插座,我检查了控制器的插座。很明显。
会出现什么问题?请帮助。