根据设备功能更改 iPhone 设置
是否可以根据当前设备功能隐藏标准设置应用程序中的某些应用程序设置?例如,用户可以选择是否显示指南针校准 UI,但如果设备没有指南针(例如 iPhone 3g),我不想显示此设置。
好吧,我认为这实际上是不可能的,但可能我在这里错过了一些简单的东西(或任何其他可用的选项)......
Is it possible to hide certain application settings in standard Settings application based on current device capabilities? For example user can choose whether to show compass calibration UI or not, but I don't want to show this setting if device does not have a compass (e.g. iPhone 3g).
Well, I think that is not possible actually but may be I missed something simple here (or any other available options)...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是可能的,并且建议这样做。一个例子是检查设备是否可以拨打电话:
还有其他方法可以检查设备功能。检查文档以找到它们。例如,
CLLocation
文档有一个+(BOOL)headingAvailable
方法,它告诉您是否可以找到标题。It is possible, and it's recommended to do this. One example is to check whether the device can make phone calls:
There are other ways to check device capabilities. Check the documentation to find them. For example, the
CLLocation
docs have a+(BOOL)headingAvailable
method, which tells you if you can find out the heading.