1 NSString * urlString = @"App-Prefs:root=WIFI"; 2 3 if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:urlString]]) { 4 5 if ([[UIDevice currentDevice].systemVersion doubleValue] >= 10.0) { 6 7 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:nil]; 8 9 } else { 10 11 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]]; 12 13 } 14 15 } 16 17 18 类似也有跳转到以下: 19 20 无线局域网 App-Prefs:root=WIFI 21 22 蓝牙 App-Prefs:root=Bluetooth 23 24 蜂窝移动网络 App-Prefs:root=MOBILE_DATA_SETTINGS_ID 25 26 个人热点 App-Prefs:root=INTERNET_TETHERING 27 28 运营商 App-Prefs:root=Carrier 29 30 通知 App-Prefs:root=NOTIFICATIONS_ID 31 32 通用 App-Prefs:root=General 33 34 通用-关于本机 App-Prefs:root=General&path=About 35 36 通用-键盘 App-Prefs:root=General&path=Keyboard 37 38 通用-辅助功能 App-Prefs:root=General&path=ACCESSIBILITY 39 40 通用-语言与地区 App-Prefs:root=General&path=INTERNATIONAL 41 42 通用-还原 App-Prefs:root=Reset 43 44 墙纸 App-Prefs:root=Wallpaper 45 46 Siri App-Prefs:root=SIRI 47 48 隐私 App-Prefs:root=Privacy 49 50 Safari App-Prefs:root=SAFARI 51 52 音乐 App-Prefs:root=MUSIC 53 54 音乐-均衡器 App-Prefs:root=MUSIC&path=com.apple.Music:EQ 55 56 照片与相机 App-Prefs:root=Photos 57 58 FaceTime App-Prefs:root=FACETIME 59 60 只需要把对应的字符串换一下就可以了。
时间: 2024-10-11 06:06:42