在沒有美工的時候,往往項目開發到一半,才拿到icon和launchImage圖片,這時在添加對應圖片之后發現並沒有正常顯示,這就蛋疼了,以下列出幾種解決方式。
關於設置launchImage:

工程配置信息中設置顯示launchImage:
1、刪除Launch Screen File
2、在Launch Images Source中設置你在Assets.xcassets中設置的啟動頁

如果你發現:項目運行並沒有顯示設置的圖片,那么試試下面這種方法
1、轉到LaunchScreen.storyboard
2、取消勾選配置信息中的Use as Launch Screen選項

好了,一切就緒!當你再次啟動程序時,如果你發現,這一切並沒有什么luan用!好吧,請在模擬器中卸載/刪除你的APP,然后再重新運行即可~
關於LaunchImage圖片命名以及其尺寸:
| 名稱 | 分辨率(pixel) | 用途 | 尺寸 |
|---|---|---|---|
| 豎屏(Portrait) | --- | --- | --- |
| Default@2x | 640x960 | 用於iPhone 4/4s | --- |
| Default-568h@2x | 640X1136 | 用於iPhone 5/5c/5s | --- |
| Default-667h@2x | 750X1334 | 用於iPhone 6/6s | Retina HD4.7 |
| Default-736h@3x | 1242X2208 | 用於iPhone 6 Plush/6s Plush | Retina HD5.5 |
| Default-812h@3x | 1125x2436 | 用於iPhone X/Xs | --- |
| Default-896h@2x | 828x1792 | 用於iPhone XR | --- |
| Default-896h@3x | 1242x2688 | 用於iPhone Xs MAX | --- |
| 橫屏(Landscape) | --- | --- | --- |
| Default-736h-Landscape@3x | 2208X1242 | 用於橫屏啟動 | Landscape Retina Hd 5.5 |
