“此设备无法使用UIStatusBarStyleBlackTranslucent。忽略Info.plist中的UIStatusBarStyle键。 - 该怎么办? [英] "UIStatusBarStyleBlackTranslucent is not available on this device. Ignoring UIStatusBarStyle key in Info.plist." - What to do?

查看:103
本文介绍了“此设备无法使用UIStatusBarStyleBlackTranslucent。忽略Info.plist中的UIStatusBarStyle键。 - 该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个适用于iPhone / iPad的通用二进制应用程序。在控制台中我总是得到这个日志:

I have a universal binary app for iPhone / iPad. In console I always get this log:


UIStatusBarStyleBlackTranslucent是这个设备上没有的
。忽略Info.plist中的
UIStatusBarStyle键。

UIStatusBarStyleBlackTranslucent is not available on this device. Ignoring UIStatusBarStyle key in Info.plist.

我现在必须担心什么吗?这两个只有一个info.plist,对吧?我怎么能阻止这个日志发生?如果我将它留在那里,我想它会淹没崩溃日志?

Must I be worried about anything now? There's just one info.plist for both, right? How could I stop this log to happen? I guess it spams up the crashlogs if I leave it in there?

推荐答案

只有一个plist。可以为该键指定iPad的不同值,但我不确定该键是否支持。

There is just one plist. It may be possible to specify a different value for the iPad for that key but I'm not sure if it's supported for that key.

听起来不像是真是太棒了。你可以从plist中删除它并以编程方式设置它。看起来如果你试图在iPad上设置它只是将状态栏设置为黑色,所以没有太多理由甚至检查UI成语....

It doesn't sound like a huge deal really. You could just remove it from the plist and set it programmaticly. It looks like if you try to set it on an iPad it just sets the status bar to black, so there's not too much reason to even check the UI idiom....

无论如何,如果您想尝试,请参阅信息属性列表主要参考文档。

Anyway, see the Information Property List Key Reference docs if you want to try it.


在iOS 3.2及更高版本中,应用程序可以
指定Info.plist文件
中的密钥,因为它仅适用于特定的
类型的设备。要创建
特定于设备的密钥,请使用以下模式将
密钥名称与一些特殊限定符
组合使用:

In iOS 3.2 and later, applications can designate keys in the Info.plist file as being applicable only to specific types of devices. To create a device-specific key, you combine the key name with some special qualifiers using the following pattern:

key_root - 〜

key_root-~

在此模式中,key_root部分
表示
键的原始名称。和
部分都是可选结尾
,可用于将密钥应用于
特定平台或设备。
目前唯一可以
指定的平台是iphoneos。

In this pattern, the key_root portion represents the original name of the key. The and portions are both optional endings that you can use to apply keys to specific platforms or devices. Currently the only platform you can specify is iphoneos.

要将密钥应用于特定设备,
你可以使用一个以下
值:

To apply a key to a specific device, you can use one of the following values:

iphone - 该密钥适用于iPhone
设备。 ipod - 该键适用于
iPod touch设备。 ipad - 键
适用于iPad设备。当

应用程序的Info.plist文件中搜索密钥时,
系统会选择特定于当前设备的最多
的密钥。对于
的例子,为了表明您想要
您的应用程序在iPhone和
iPod touch设备上以
纵向方式启动,但在iPad上以
横向直播你将
配置你的Info.plist与
以下的键:

iphone - The key applies to iPhone devices. ipod - The key applies to iPod touch devices. ipad - The key applies to iPad devices. When searching for a key in your application’s Info.plist file, the system chooses the key that is most specific to the current device. For example, to indicate that you want your application to launch in a portrait orientation on iPhone and iPod touch devices but in landscape-right on iPad, you would configure your Info.plist with the following keys:

这篇关于“此设备无法使用UIStatusBarStyleBlackTranslucent。忽略Info.plist中的UIStatusBarStyle键。 - 该怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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