Localize Asset Catalogs

让人想犯罪 __ 提交于 2019-11-28 16:12:30

I went the classic way. Just use single localized images and set up your plist correctly. The easiest way is to use one asset catalog, set everything up. Then open the application bundle and copy the correctly named files + the correct info.plist entries. (And of course remove the assets catalog afterwards) Result looks like this:

Info-plist:

Launch images filenames:

(I needed all iPad orientations/sizes + all portrait iphone sizes + 7.0 specific sizes)

From Apple's documentation, you need to set the UILaunchImageFile key to a custom launch image filename.

You then need to have localize that file.

And make sure that your Launch Image is not set to use an asset catalog.

I have the same problem in XCode 6.0 and iOS 7 and 8. Don't use Images.xcassets for splash screen. Add the following key to Info.plist:

<key>UILaunchImages~ipad</key>
<array>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>7.0</string>
        <key>UILaunchImageName</key>
        <string>Default-Landscape</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{768, 1024}</string>
    </dict>
</array>

Asset Catalog assets and images localization is supported since Xcode 11.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!