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

iOS 应用内打开系统设置

2016-11-02 17:13 281 查看

一 调用方法

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:path] options:@{} completionHandler:nil];

#else

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

#endif

二 参数值

@[@"Wi-Fi", @"App-Prefs:root=WIFI"],

@[@"Bluetooth",@"App-Prefs:root=Bluetooth"],

@[@"mobile network", @"App-Prefs:root=MOBILE_DATA_SETTINGS_ID"],

@[@"Internet share", @"App-Prefs:root=INTERNET_TETHERING"],

@[@"Carrier", @"App-Prefs:root=Carrier"],

@[@"notification", @"App-Prefs:root=NOTIFICATIONS_ID"],

@[@"General", @"App-Prefs:root=General"],

@[@"About", @"App-Prefs:root=General&path=About"],

@[@"Keyboard", @"App-Prefs:root=General&path=Keyboard"],

@[@"Wallpaper", @"App-Prefs:root=Wallpaper"],

@[@"Profile", @"App-Prefs:root=General&path=ManagedConfigurationList"],

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000

@[@"Siri", @"App-Prefs:root=SIRI"],

#else

@[@"Siri", @"App-Prefs:root=General&path=SIRI"],

#endif

@[@"Privacy", @"App-Prefs:root=Privacy"],

@[@"location", @"App-Prefs:root=Privacy&path=LOCATION"],

@[@"Microphone ", @"App-Prefs:root=Privacy&path=MICROPHONE"],

@[@"Contacts ", @"App-Prefs:root=Privacy&path=CONTACTS"],

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000

@[@"Safari", @"App-Prefs:root=Safari"],

#else

@[@"Safari", @"App-Prefs:root=SAFARI"],

#endif

@[@"music", @"App-Prefs:root=MUSIC"],

@[@"music-EQ", @"App-Prefs:root=MUSIC&path=com.apple.Music:EQ"],

@[@"photos & camera", @"App-Prefs:root=Photos"]

三 说明

1. #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000 判断系统是否大于iOS 10

2. 以上参数已在iOS9 & iOS10 测试通过
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  iOS 系统设置