-
删除旧的LaunchImage
1.将其中一张启动图先丢到Assets.xcassets
中,删除Assets.xcassets
中的LaunchImage
文件夹;
2.TARGETS -> General -> App Icons and Launch Images -> Launch Screen File -> LaunchScreen
;
3.Build Settings -> Asset Catalog Launch Image Set Name
删除LaunchImage
。
-
LaunchScreen.storyboard设置
1.在view
上添加UIImageView
![](https://img.haomeiwen.com/i1640079/2b206aa9d3794c48.png)
2.给UIImageView
添加image
,并将Content mode
设置为Aspect Fill
![](https://img.haomeiwen.com/i1640079/6f98936e95704698.png)
3.设置UIImageView
布局
![](https://img.haomeiwen.com/i1640079/f6856a8e1dc4f1f3.png)
4.如果你发现启动时启动图没有占到状态栏,那么左侧选中View Controller Scene
,把Extend Edges
-> Under Top Bars
勾选去掉,Transition Style
设置为Cover Vertical
,Presentation
设置为Full Screen
![](https://img.haomeiwen.com/i1640079/eb8811622b321c50.png)
网友评论