该错误提示缺少rootViewController
解决方法:在AppDelegate中添加一个rootViewController
代码:
在AppDElegate中的didFinishLauchingWithOptions方法中添加:
NSArray *windows = [[UIApplication sharedApplication]windows];
for(UIWindow *window in windows){
if (window.rootViewController == nil) {
UIViewController *vc = [[UIViewController alloc]initWithNibName:nil
bundle:nil];
window.rootViewController = vc;
}
}
网友评论