Loaded the nib but didn't get a UITableView Exception

半腔热情 提交于 2019-12-17 22:02:28

问题


I'm trying to load a uitableview using ECSlidingViewController methods.

When I call this code:

UIStoryboard*  sb = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone"
                                              bundle:nil];
UITableViewController* page = [sb instantiateViewControllerWithIdentifier:@"tableViewPage"];

CGRect frame = self.slidingViewController.topViewController.view.frame;
self.slidingViewController.topViewController = page;
self.slidingViewController.topViewController.view.frame = frame;
[self.slidingViewController resetTopView];

while "tableViewPage" is a tableView Controller, not a view with a table. It gives me:

[UITableViewController loadView] loaded the "Bzc-w8-vsI-view-gnu-XH-Eb0" nib but didn't get a UITableView.'

I tried to made a method like topViewController just for uitableviewcontroller instead of uiviewcontroller ... but I failed. What did I miss?


回答1:


I think it's trying to tell you that you have a UITableViewController in your storyboard but the top-level view associated with that controller is not a UITableView.



来源:https://stackoverflow.com/questions/17924146/loaded-the-nib-but-didnt-get-a-uitableview-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!