-
1.从项目中删除LaunchScreen.storyboard和Main.storyboard:
从Info.plist中删除Launch screen interface file base name和Main storyboard file base name。- 对应Genenal | App Icons and Launch Images | Launch Screen File
- 对应Genenal | Deployment Info|Main Interface
-
2.删掉Launch Screen File之后,启动屏幕大小总是320x480。
上下有黑条,且点击黑条部分报错:
- unexpected nil window in _UIApplicationHandleEventFromQueueEvent,
- _windowServerHitTestWindow: <UIClassicWindow: 0x7fc798411d80; frame = (0 0; 375 667); userInteractionEnabled = NO;
原因:
由于5/5s上市时,需要兼容之前版本的App,同时要减少适配的开发成本。最后就出了唯一的一个判断标准:如果有相应设备尺寸的开机图,系统就当该App针对新设备做过适配,否则就按照320x480来计算,然后在iPhone5/6的模拟器屏幕上下自动补黑条。解决方案:
向工程同名目录添加启动图片:- iPhone4/4s: [email protected](640*960)
- iPhone5/5s: [email protected](640*1136)
- iPhone6: [email protected](750*1334)
- iPhone6+: [email protected](1242*2208)
-
参考:
《从项目中删除storyboards》
《iOS8 launch image的设置方法》
《iPhone6(+)适配LaunchImage》
《增加[email protected]支持iPhone5》
《Xcode6在模拟器iPhone5/iOS7的版面上下黑边》
mnloop / emptyapplication Goto Github PK
View Code? Open in Web Editor NEWThis project forked from fan2/emptyapplication
由Single View Application项目删除storyboard生成纯代码Empty Application模板