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 markdown
5.運行項目,每一步都不能少,否則報錯!
6.LaunchScreen.storyboard 中添加界面和佈局內容 不必定要一整張完整的圖片 也能夠是 佈局搭建
添加imageView,設置image爲scaleAspectFill,添加mage,四周間距爲0;佈局
去掉use Full Screen的勾選;ui