如何使用 iOS 5.1 打开首选项/设置? [英] How to open preferences/settings with iOS 5.1?

查看:28
本文介绍了如何使用 iOS 5.1 打开首选项/设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来 iOS 5.1 已经破坏了用于将用户导航到首选项的标准 URL 编码.

Looks like iOS 5.1 has broken the standard URL encoding for navigating a user to a Preference.

例如:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=TWITTER"]];

适用于 iOS 5.0,但不适用于 iOS 5.1(设备和模拟器).

Works in iOS 5.0 but not in iOS 5.1 (both device and simulator).

有没有人找到在 iOS 5.1 中复制此功能的方法?

Has anyone found a way to replicate this functionality in iOS 5.1?

推荐答案

不,我不知道如何复制此功能.

No I don’t know a way to replicate this functionality.

但是您可以做的是提交请求恢复的雷达.这是一个雷达,要求首先记录这些方案.

But what you can do is file a Radar requesting the restoration. Here is a radar requesting that the schemes be documented in the first place.

David Barnard 已确认 iOS 5.1 打破了设置应用程序的 URL 方案.

David Barnard has confirmed that iOS 5.1 breaks the settings apps URL schemes.

更新:iOS 8 具有类似的功能,用于打开您的应用设置.感谢 Apple,迈克Soto_iGhost.

Update: iOS 8 has similar functionality for opening your app’s settings. Thanks Apple, Mike and Soto_iGhost.

常量UIApplicationOpenSettingsURLString(UIApplication 文档) 将打开您的应用程序的设置,而不是 Twitter 的设置.功能不完全相同,但比以前干净得多,现在得到官方认可.

The constant UIApplicationOpenSettingsURLString (UIApplication Documentation) will open the settings for your app and not, say Twitter’s settings. Not exactly the same functionality but much cleaner than before and now officially recognized.

既然每个应用在设置"中都有一个用于使用隐私、蜂窝数据、后台应用刷新和通知的位置,这应该会特别有用.

This should be extra useful now that each app has a place in Settings for using privacy, cellular data, background app refresh and notifications.

这篇关于如何使用 iOS 5.1 打开首选项/设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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