苹果提出从2020年4月份开始,所有支持iOS 13
的App
必须提供LaunchScreen.storyboard
,否则将无法提交到App Store
进行审核。所以如果需要用LaunchScreen.storyboard设置启动图,请参考另一篇文章:LaunchScreen.storyboard 替代LaunchImage启动图适配
另一种方法:(已废弃)
在Assets.xcassets设置启动图
1、点击Assets.xcassets,然后点击Assets里面左下角的加号,然后选择iOS-->iOS Launch Image,如下图

2、然后在LaunchImage里面放置对应的图片

3、清空Launch Screen File,如下图

4、在Targets-->Build Setting 搜索Launch,把Asset Catalog Launch Image Set Name的值设置为刚刚创建的 LaunchImage,如下图

5、最后把LaunchScreen.storyboard 的 Use as Launch Screen和Use Safe Area Layout Guides 取消选中。
注:如果设置好了没有显示启动图,就把APP删除掉重新安装就好了
网友评论