iOS 6自定义URL方案启动图像错误 [英] iOS 6 Custom URL Scheme Launch Images wrong

查看:112
本文介绍了iOS 6自定义URL方案启动图像错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中实现了自定义URL方案。此外,我使用info.plist中的 UILaunchImageFile 键为启动图像指定了不同的名称。文档说:

I have implemented custom URL schemes in my application. Also I have different names for the splash image using the UILaunchImageFile key in the info.plist. The documentations says:


如果您的应用支持一个或多个自定义URL方案,它还可以
提供自定义启动图像每个URL方案。当系统
启动您的应用程序以处理URL时,它会显示与给定URL的方案关联的启动图像
。在这种情况下,启动图像文件名的格式
如下:

If your app supports one or more custom URL schemes, it can also provide a custom launch image for each URL scheme. When the system launches your app to handle a URL, it displays the launch image associated with the scheme of the given URL. In this case, the format for your launch image filenames are as follows:

<basename>-<url_scheme><scale_modifier><device_modifier>.png

修饰符是表示名称的字符串你的
URL方案名称。例如,如果您的应用支持名为myscheme的
的URL方案,系统会查找名为
的图像默认为myscheme.png(或Retina显示的Default-myscheme@2x.png)应用程序包中的
。如果应用程序的Info.plist文件包含
UILaunchImageFile键,则基本名称部分将从默认值更改为
您在该键中提供的自定义字符串。

The modifier is a string representing the name of your URL scheme name. For example, if your app supports a URL scheme with the name myscheme, the system looks for an image with the name Default-myscheme.png (or Default-myscheme@2x.png for Retina displays) in the app’s bundle. If the app’s Info.plist file includes the UILaunchImageFile key, the base name portion changes from Default to the custom string you provide in that key.

注意:您可以将URL方案修饰符与方向
修饰符组合使用。如果你这样做,文件名的格式是

Note: You can combine a URL scheme modifier with orientation modifiers. If you do this, the format for the filename is

<basename>-<url_scheme><orientation_modifier><scale_modifier><device_modifier>.png.

有关启动方向修改器的更多信息,请参阅
为不同方向提供启动图像iOS 5上的

For more information about the launch orientation modifiers, see "Providing Launch Images for Different Orientations."

显示了该方案的正确启动图像,但在iOS 6上显示了正常的启动图像。我发现如果我使用默认基本名称重命名它在iOS 6上工作正常,但这会弄乱我的项目。因此,我将无法支持多个版本

on iOS 5 the correct splash image for the scheme is presented but on iOS 6 it shows the normal splash image. I discovered that if I rename it using the "Default" basename it works fine on iOS 6 but this will mess up my project. Thus I will not be able to support multiple versions

任何人都有同样的问题?

Anyone has the same problem?

推荐答案

问题解决了。仅供参考,每个人都有关键UILaunchImageFile的价值,在基本名称的末尾有一个文件扩展名。这就是问题。因此,请不要在启动映像的基本名称中包含.png等文件扩展名!

Well issue solved. FYI everyone out there that has value for the key UILaunchImageFile with a file extension at the end of the base name. This is the problem. So do not include file extensions like ".png" in your basename for the launch image!!!

这篇关于iOS 6自定义URL方案启动图像错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆