您的位置:首页 > 移动开发 > IOS开发

ios--调用设备系统功能

2018-02-06 00:55 225 查看
//想要实现应用内跳转到系统设置界面功能,需要先在Targets-Info-URL Types-URL Schemes中添加prefs

-(void)OpenAppSetting{

//Wifi


// if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@”prefs:root=WIFI”]])

// {

// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”prefs:root=WIFI”]];

// }

// 蓝牙

// if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@”prefs:root=General”]])

// {

// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”prefs:root=General”]];

// }

//通用


// if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@”prefs:root=General”]])

// {

// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”prefs:root=General”]];

// }

//跳转到定位服务


// if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@”prefs:root=LOCATION_SERVICES”]])

// {

// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”prefs:root=LOCATION_SERVICES”]];

// }

//跳转到通知


// if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@”prefs:root=NOTIFICATIONS_ID”]])

// {

// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@”prefs:root=NOTIFICATIONS_ID”]];

// }

//其他设置


// @{@”系统设置”:@”prefs:root=INTERNET_TETHERING”},

// 7 @{@”WIFI设置”:@”prefs:root=WIFI”},

// 8 @{@”蓝牙设置”:@”prefs:root=Bluetooth”},

// 9 @{@”系统通知”:@”prefs:root=NOTIFICATIONS_ID”},

// 10 @{@”通用设置”:@”prefs:root=General”},

// 11 @{@”显示设置”:@”prefs:root=DISPLAY&BRIGHTNESS”},

// 12 @{@”壁纸设置”:@”prefs:root=Wallpaper”},

// 13 @{@”声音设置”:@”prefs:root=Sounds”},

// 14 @{@”隐私设置”:@”prefs:root=privacy”},

// 15 @{@”APP Store”:@”prefs:root=STORE”},

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: