ios 13.0 之后 废弃 launch image 作为启动图

6,026 阅读1分钟

1.刪除Images.xcassets中的LaunchImage文件夹 凡是带有 launchImage 的文件都要删除

2.在Build Settings中,Asset Catalog Launch Image Set Name中刪除LaunchImage(包含Debug和Release中)

3.在项目中添加LaunchScreen.storyboard

  • 设置storyboardID为LaunchScreen;

4.修改项目的配置:

TARGETS -> General -> App Icons and Launch Images -> Launch Screen File -> Main TARGETS -> General -> Main Interface -> LaunchScreen

5.运行项目,每一步都不能少,不然报错!

6.LaunchScreen.storyboard 中添加界面和布局内容 不一定要一整张完整的图片 也可以是 布局搭建

  • 如果是一整张图 添加imageView,设置image为scaleAspectFill,添加mage,四周间距为0;

去掉use Full Screen的勾选;