iOS Xcode7设置启动图launchImage

使用LaunchScreen.storyboard设置启动图
1.打开LaunchScreen.storyboard


BD8898B0-F552-4AC4-AF85-2662919581BD.png


2.在LaunchScreen.storyboard上拖入一个imageView


087604F1-F373-4D9D-A61B-DD0F68426218.png

给imageview添加好全屏约束

3.在Assets.xcassets 中 画红线的区域,右击,点击New Image Set,在右边的image中拖入裁切好的图片


D1C043D5-E5AD-4708-AE7F-6BB68369ED02.png

图片尺寸参考:


屏幕快照 2016-01-15 17.12.48.png


图片尺寸不对,无法完成屏幕适配:如图:


6E81A7A5-5271-406C-8296-2261E63172B1.png

4.回到LaunchScreen.storyboard,将Assets.xcassets中的图片拖到iamgeView中.如图


1D9A9201-8DB2-4811-BA3B-56F89A9E0109.png

5(Xcode默认已经选择好LaunchScreen.storyboard作为启动图设置,如果前四步设置好还没有出现启动图,请参照此条)查看TARGETS中的General下的App Icons and Launch Images选项中的Launch ScreenFile 是否是LaunchScrren


A715C313-88C7-468E-A815-99A6164CD2B0.png

注意:选择LaunchScreen.storyboard


屏幕快照 2016-01-15 17.08.07.png

第四步完成的时候就已经设置成功启动图了.如图:

原文地址:https://www.cnblogs.com/duyuiOS/p/5354336.html