How to open settings from my iPad application (Obj

2019-02-10 23:03发布

This question already has an answer here:

I've tried using:

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

And options trading all you see here:

examples

But I can not make it work.

1条回答
Deceive 欺骗
2楼-- · 2019-02-10 23:38

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

EDIT

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

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

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

查看更多
登录 后发表回答