iOS Could not find a storyboard named 'Main' in bundle NSBundle

1、在最新的Xcode6.0之后新建项目默认的是使用Main.storyboard,有些人习惯用storyboard有些人不习惯使用,当我们新建项目删除storyboard时我们运行项目发现会报错:Could not find a storyboard named 'Main' in bundle NSBundle,这是因为我们把storyboard删除了,而storyboard相对的路径没有删除

2、删除Main.storyboard后,我们需要在AppDelegate.m中初始化一个window进行使用,否则应用程序没有window可用

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

 

posted @ 2014-11-24 10:20  暗夜追星  阅读(1151)  评论(0编辑  收藏  举报