買了個新款ipad pro 11寸的,發現咱們的ipad項目。 上下左右都有黑邊xcode
使用info.plist設置啓動圖,不用asset和launch storyboardspa
圖片用以下格式命名,拖到項目中:code
<key>UILaunchImages~ipad</key> <array> <dict> <key>UILaunchImageSize</key> <string>{1024, 1366}</string> <key>UILaunchImageOrientation</key> <string>Landscape</string> <key>UILaunchImageName</key> <string>Default-iOS12-Landscape-1024h</string> <key>UILaunchImageMinimumOSVersion</key> <string>12.0</string> </dict> <dict> <key>UILaunchImageSize</key> <string>{834, 1194}</string> <key>UILaunchImageOrientation</key> <string>Landscape</string> <key>UILaunchImageName</key> <string>Default-iOS12-Landscape-834h</string> <key>UILaunchImageMinimumOSVersion</key> <string>12.0</string> </dict> <dict> <key>UILaunchImageSize</key> <string>{834, 1112}</string> <key>UILaunchImageOrientation</key> <string>Landscape</string> <key>UILaunchImageName</key> <string>Default-iOS11-Landscape-834h</string> <key>UILaunchImageMinimumOSVersion</key> <string>11.0</string> </dict> <dict> <key>UILaunchImageMinimumOSVersion</key> <string>7.0</string> <key>UILaunchImageName</key> <string>Default-iOS7-Landscape</string> <key>UILaunchImageOrientation</key> <string>Landscape</string> <key>UILaunchImageSize</key> <string>{768, 1024}</string> </dict> </array>
------下面的解決辦法不是很完美,launch screen file 的圖片在不一樣尺寸的屏幕上可能會變形,仍是使用上面info.plist的方式更好---------blog
解:圖片
升級到最新版xcode: Version 10.1 (10B61)ip
不使用launch image做爲啓動圖,string
使用launch screen file做爲啓動圖io
搞定class