对设置包中显示的项目设置条件
嘿大家。我想知道是否可以对应用程序的设置捆绑包的设置应用程序中显示的项目设置条件。
例如:我的应用程序中有几个与相机行为相关的设置。但我不希望这些项目出现在没有相机的设备上的设置应用程序中。
我知道如何在应用程序中足够简单地检查和执行所有这些操作,但似乎无法在设置捆绑包中找到任何有关此内容的信息。我认为从 2010 年中期起,我至少看到了一个与此相关的问题,但尚未得到解答。
任何帮助将不胜感激。
Hey All. I'm wondering if it is possible to place conditions on what items will appear in the settings app for an application's settings bundle.
For example: I have several settings related to behavior of the camera in my app. But I do not want those items to appear in the settings app on devices that do not have a camera.
I know how to check and do all of this in the app easy enough, but cannot seem to be able to find anything about this for the settings bundle. I saw at least one question about this from I think mid 2010 but it hasn't been answered.
Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的理解是,这些设置是在编译时确定的,不能在运行时修改。
这是一个类似的问题:
隐藏设置包中的首选项
两个选项:
创建应用内首选项设置。不过,我记得在 Apple Dev 网站上读到过 Apple 建议不要这样做。
向相机相关设置添加一个值:“不可用”。当应用程序启动时,确定是否有相机,如果没有,则以编程方式将这些设置设置为“不可用”。
编辑:
我刚刚遇到这个: OnlyDisplayOnInterfaceIdiom。
My understanding is that the settings are determined at compilation time and cannot be modified at runtime.
Here's a similar question:
Hiding preferences items in the settings bundle
Two options:
Create in-app preference settings. However, I remember reading on the Apple Dev site that Apple recommends against this.
Add a value to the camera related settings: "Unavailable". When the app is launched, determine if there is a camera, if not, programmatically set those settings to "Unavailable".
EDIT:
I just came across this: OnlyDisplayOnInterfaceIdiom.