且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

启动图像未显示在iOS应用程序中(使用Images.xcassets)

更新时间:2023-10-16 14:43:22

我终于想通了!

所以,在您的项目设置,请转到以下部分:应用程序图标和启动图像

So, in your project settings, go to the section that says: App Icons and Launch Images

删除启动屏幕文件如果您不想使用.xib文件。

Remove the information found in Launch Screen File if you do not want to use .xib file.

然后,在启动图像源,选择要迁移,如果已经创建了LaunchImage文件并将图像添加到其中,则单击显示的资产目录。包含启动图像的名称。

Then, in Launch Image Source, Choose to migrate and if you have already created your LaunchImage file and added the images to it. Then click the asset catalog that shows up. The name of the one that contains your Launch Images.

这将在你的图像集中创建一个新的Launch-Image2。要使用你已经创建的那个,cli ck启动图像源旁边的下拉菜单。你应该看到你的其他Launch Image集。选择它。然后重新构建您的应用程序并运行它。你应该看到你的Launch Image。 =)

This will create a new Launch-Image2 in your image set. To use the one you already have created, click the drop-down menu next to Launch Image Source. And you should see your other Launch Image set. Choose it. Then re-build your application and run it. You should see your Launch Image. =)

希望这会有所帮助!

注意:它不会删除您已有的图像资产目录。它只会创建一个新的LaunchImage资产集。

Note: it won't delete your images that you already have in the asset catalog. It will just create a new LaunchImage asset set.

参考: https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/StoringAppIconsandLaunchImagesinanAssetCatalog.html