iOS跳转到系统设置(如:定位、音乐、墙纸设置、蓝牙等)

- (void)methodOne:(id)sender {
    //测试定位服务
    NSURL *url=[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"];
    if ([[UIApplication sharedApplication]canOpenURL:url]) {
        [[UIApplication sharedApplication]openURL:url];
    }
}
- (void)methodTwo:(id)sender {
    //测试WIFI
    NSURL *url=[NSURL URLWithString:@"prefs:root=WIFI"];
    if ([[UIApplication sharedApplication]canOpenURL:url]) {
        [[UIApplication sharedApplication]openURL:url];
    }
    
}
- (void)methodThree:(id)sender {
    //测试facetime设置界面
    NSURL *url=[NSURL URLWithString:@"prefs:root=FACETIME"];
    if ([[UIApplication sharedApplication]canOpenURL:url]) {
        [[UIApplication sharedApplication]openURL:url];
    }
    
    
}
- (IBAction)methodFour:(id)sender {
    //测试音乐界面
    NSURL *url=[NSURL URLWithString:@"prefs:root=MUSIC"];
    if ([[UIApplication sharedApplication]canOpenURL:url]) {
        [[UIApplication sharedApplication]openURL:url];
    }
}
- (IBAction)methodFive:(id)sender {
    //测试墙纸设置界面
    NSURL *url=[NSURL URLWithString:@"prefs:root=Wallpaper"];
    if ([[UIApplication sharedApplication]canOpenURL:url]) {
        [[UIApplication sharedApplication]openURL:url];
    }
    
}
- (IBAction)methodSix:(id)sender {
    //测试蓝牙
    NSURL *url=[NSURL URLWithString:@"prefs:root=Bluetooth"];
    if ([[UIApplication sharedApplication]canOpenURL:url]) {
        [[UIApplication sharedApplication]openURL:url];
    }
}
- (IBAction)methodSeven:(id)sender {
    //iCloud设置界面
    NSURL *url=[NSURL URLWithString:@"prefs:root=CASTLE"];
    if ([[UIApplication sharedApplication]canOpenURL:url]) {
        [[UIApplication sharedApplication]openURL:url];
    }
}

你可能感兴趣的:(ios,蓝牙,定位,系统设置)