• iOS 跳转系统功能


     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 只需要把对应的字符串换一下就可以了。
  • 相关阅读:
    分形之城
    【SDOI2011 第2轮 DAY1】消防 树上问题+二分+贪心
    【Usaco Nov08 Gold】玩具 三分+贪心
    分治 复习
    快读板子
    最小线段覆盖 C神奇项链
    比赛经验积累1
    字符串 专题
    界面小项目之W3C
    前端小基础
  • 原文地址:https://www.cnblogs.com/yevgeni/p/6932036.html
Copyright © 2020-2023  润新知