买了个新款ipad pro 11寸的,发现我们的ipad项目。 上下左右都有黑边
使用info.plist设置启动图,不用asset和launch storyboard
图片用如下格式命名,拖到项目中:
<key>UILaunchImages~ipad</key>
<array>
<dict>
<key>UILaunchImageSize</key>
<string>{, }</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>{, }</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>{, }</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>{, }</string>
</dict>
</array>
------下面的解决办法不是很完美,launch screen file 的图片在不同尺寸的屏幕上可能会变形,还是使用上面info.plist的方式更好---------
解:
升级到最新版xcode: Version 10.1 (10B61)
不使用launch image作为启动图,
使用launch screen file作为启动图
搞定