适配ipad Pro

买了个新款ipad pro 11寸的,发现我们的ipad项目。 上下左右都有黑边

 

 

 

 

使用info.plist设置启动图,不用asset和launch storyboard

图片用如下格式命名,拖到项目中:

 

<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的方式更好---------

 

解:

升级到最新版xcode:  Version 10.1 (10B61)

不使用launch image作为启动图,

使用launch screen file作为启动图

搞定

 

转载于:https://www.cnblogs.com/tufei7/p/10361229.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值