记得上一个版本,我只添加了一个Image set,名为LaunchImage,然后往里面添加了对应尺寸的启动图,现在在Xcode 7.2下好像不行了,添加后然后在设置里设置了APP启动也没啥用,我的测试机是iPhone 6 plus,iOS 9.2的系统
后来查获得了如下信息:
“开发过程中遇到同样的问题,研究了一下苹果文档 总结为如下:
1.旧方式:Launch Images Source 添加启动图,Launch Screen File 中删掉“LaunchScreen”,置为空;
2.新方式:Launch Images Source 中不需要添加启动图,Launch Screen File 为“ LaunchScreen”(默认),LaunchScreen.storyboard添加imageView,imageView上放图片,工程中要有对应的 750*1334 的@2x图,1242 * 2208的@3x图 ”
照着做确实能显示启动图片,不过这就有个问题了,为什么苹果要搞两种方式设置启动图,到底用哪个?其实不止我一个人有这个问题,老外也有:
“Unfortunately, if your app is also targeting older versions of iOS (even iOS 7), you'll have no other option than also including launch images for all iPhone devices (except iPhone 6, which doesn't run these versions of iOS, obviously). This is a pain, but Apple made the right move by providing this new feature for future developments.”
也就是说如果你要支持iOS 8.0以前的版本,比如iOS 7.1,那就必须包含LaunchImage Asset,否则,只需要像在APP中使用图片一样,添加一个2x和3x图片在LaunchScreen.storyboard添加的imageView中展示就可以。
希望理解没有偏差
参考资料:
1.主题 : Xcode7中如何使用LaunchScreen.storyboard:http://www.cocoachina.com/bbs/read.php?tid-326916.html
2.Launch image or launch xib / storyboard?:http://stackoverflow.com/questions/27998284/launch-image-or-launch-xib-storyboard