为什么不在Xcode中的iPhone6中使用Launch Image查看全屏显示?

时间:2017-03-23 03:32:28

标签: ios xcode

我使用Launch Screen(launchscreen.storyboard)并在ViewControllers和launchscreen.storyboard中选中“使用自动布局”。

但是当我在一般情况下设置启动屏幕文件时 - >除了iPhoneSE和6之外,ViewController中的应用程序图标和启动图像,视图(UIView子类)不显示全屏(ViewController中的背景图像显示全屏。)

删除应用程序图标和启动图像中的“启动屏幕文件”,视图显示全屏。 (我试图将xib文件用于launchImage,但它是一样的。)

我该如何解决?

1 个答案:

答案 0 :(得分:0)

这通常在您的启动图像不正确时发生。 iOS根据启动图像的大小确定屏幕大小。我面对iPhone 6的类似问题,我通过在应用程序中添加启动图像作为png(不在images.Assets中)并在info.plist中添加UILaunchImages字典来解决该问题。     但是iPhone 6也使用了风景图像。这是info.plist的源代码。但我们确信所有发射图像的大小都是正确的。

<array>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.1</string>
            <key>UILaunchImageName</key>A
            <string>Default-320x480</string>
            <key>UILaunchImageOrientation</key>
            <string>LandscapeLeft</string>
            <key>UILaunchImageSize</key>
            <string>{320, 480}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.1</string>
            <key>UILaunchImageName</key>
            <string>Default-320x480</string>
            <key>UILaunchImageOrientation</key>
            <string>LandscapeRight</string>
            <key>UILaunchImageSize</key>
            <string>{320, 480}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.1</string>
            <key>UILaunchImageName</key>
            <string>Default-Landscape-568h</string>
            <key>UILaunchImageOrientation</key>
            <string>LandscapeLeft</string>
            <key>UILaunchImageSize</key>
            <string>{320, 568}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>7.0</string>
            <key>UILaunchImageName</key>
            <string>Default-568h</string>
            <key>UILaunchImageOrientation</key>
            <string>Portrait</string>
            <key>UILaunchImageSize</key>
            <string>{320, 568}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.1</string>
            <key>UILaunchImageName</key>
            <string>Default-375x667</string>
            <key>UILaunchImageOrientation</key>
            <string>LandscapeLeft</string>
            <key>UILaunchImageSize</key>
            <string>{375, 667}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.1</string>
            <key>UILaunchImageName</key>
            <string>Default-375x667</string>
            <key>UILaunchImageOrientation</key>
            <string>LandscapeRight</string>
            <key>UILaunchImageSize</key>
            <string>{375, 667}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.1</string>
            <key>UILaunchImageName</key>
            <string>Default-2208x1242</string>
            <key>UILaunchImageOrientation</key>
            <string>LandscapeLeft</string>
            <key>UILaunchImageSize</key>
            <string>{414, 736}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.1</string>
            <key>UILaunchImageName</key>
            <string>Default-2208x1242</string>
            <key>UILaunchImageOrientation</key>
            <string>LandscapeRight</string>
            <key>UILaunchImageSize</key>
            <string>{414, 736}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.1</string>
            <key>UILaunchImageName</key>
            <string>Default-2048x1536</string>
            <key>UILaunchImageOrientation</key>
            <string>LandscapeLeft</string>
            <key>UILaunchImageSize</key>
            <string>{768, 1024}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.1</string>
            <key>UILaunchImageName</key>
            <string>Default-2048x1536</string>
            <key>UILaunchImageOrientation</key>
            <string>LandscapeRight</string>
            <key>UILaunchImageSize</key>
            <string>{768, 1024}</string>
        </dict>
    </array>