如何从我的iPad应用程序中打开设置(Objective-C) [英] How to open settings from my iPad application (Objective-C)

查看:243
本文介绍了如何从我的iPad应用程序中打开设置(Objective-C)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试过使用:

[[UIApplication sharedApplication] openURL: [NSURL URLWithString: @ "prefs: root = General & path = Network"]];

和期权交易你在这里看到的所有:

And options trading all you see here:

示例

但我无法使其发挥作用。

But I can not make it work.

推荐答案

Apple不再允许开发人员在他们的应用程序中打开设置应用程序( iOS 5.1及更高版本。

Apple no longer allows developers to open the Settings application from within their apps (iOS 5.1 and later).

编辑

EDIT

根据@ Mike的评论,这可以在iOS 8 +中完成

According to @Mike's comment below, this can be done in iOS 8+

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];

然而,在iOS 8之前使用它会导致崩溃。

Using this prior to iOS 8 will result in a crash, however.

这篇关于如何从我的iPad应用程序中打开设置(Objective-C)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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