项目当中遇到过这种问题
控制台提示
Application tried to push a nil view controller on target .
先说下项目的情况,
由于我要push 的控制器是用StoryBoard画的,
而我自己新建的rootVIewController 用代码所编写,
那么,在push的时候 显然用不了StoryBoard直接连线的方法,
这里,自己push过去 就会提示找不到所要push的控制器资源,
解决方法:
//Main 是storyboar的资源名
_storyBoard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
//实例化一个所要push的控制器
PerfectInformationViewController *informationVC = [_storyBoard instantiateViewControllerWithIdentifier:@"informationVC"];
//这样,就让资源链接起来了