启动图LaunchImage
两种方法设置启动图
1、LaunchScreen.storyboard
1、在LaunchScreen.storyboard
中,拖拽imageView
并设置约束,勾选右侧Use as launch Screen
2、工程—>General
—>App Icons and Launch Images
选项中设置Launch Screen File
为所制作的LaunchScreen.storyboard
或LaunchScreen.xib
2、Assets.xcassets
1、准备图片
各种尺寸(单位:px),png格式的启动图:
320×480,640×960,640×1136,750×1334,1242×2208,1125x2436
(横屏需2208×1242)
- iPhone Portrait iOS5,6
(1x:320×480, 2x:640×960, Retina 4:640×1136)
- iPhone Portrait iOS8,9
(Retina HD 5.5:1242×2208, Retina HD 4.7:750×1334)
- iPhone Landscape iOS 8,9
(Retina HD 5.5:2208×1242)
- iPhone Portrait iOS7,9
(2x:640×960, Retina 4:640×1136)
- iPhone X Portrait iOS 11+
(3x:1125x2436)
2、将各尺寸的图片拖到LaunchImage
中
3、配置
工程—>General
—>App Icons and Launch Images
选项中设置Launch Image Source
为LaunchImage
取消勾选Use as Launch Screen
置空路径Launch Screen File
启动广告
参考资料
https://www.jianshu.com/p/e52806516139
https://www.jianshu.com/p/abb490d20eec
网友评论