问题
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:
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.
来源:https://stackoverflow.com/questions/25558836/how-to-open-settings-from-my-ipad-application-objective-c