码迷,mamicode.com
首页 > 移动开发 > 详细

报错Application windows are expected to have a root view controller at the end of application launc

时间:2015-07-13 18:40:09      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:application   控制台   报错   objective-c   ios   

控制台执行出现如下报错

Application windows are expected to have a root view controller at the end of application launch


解决办法

在AppDelegate.m中的

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions


中输入

 XXXController *controller = [[XXXViewController alloc]init];

 [self.window setRootViewController:controller];


即可

报错Application windows are expected to have a root view controller at the end of application launc

标签:application   控制台   报错   objective-c   ios   

原文地址:http://blog.csdn.net/bjourney/article/details/46864803

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!