Could not load NIB in bundle: 'NSBundle when using storyboarding

烈酒焚心 提交于 2019-11-28 11:57:32

I got exactly this error, too.

Finally I found the cause was I accessed self.tableView in -(id)initWithCoder:(NSCoder *)aDecoder before it was initiated.

So, I moved those code into - (void)viewDidLoad, everything went well.

This question appears to have been answered in the comments area. Reposting here so question shows as having an answer. -- gs.

Answer copied from comments:

There was a memory leak in a 3rd party component. Once the resources were exhausted, it would crash with the error above. A couple weeks of QA/Beta testing confirmed that it is gone. Thanks. – stubble jumper Jan 24 at 2:29

I've had this problem before. The name of my nib was different than the name of my view controller while using - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil as my init.

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