iOS5.1+之后跳转setting页面的方式都失效了,不过在iOS8苹果有提供了一个键值允许app跳转到setting页面,具体代码如下:
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
实际的url string是@"app-settings:",当在其后面追加子section(例如"Bluetooth", "GENERAL"),也只能跳到系统设置首页