iOS 开发Swift初体验iOS日常知识储备

Swift : 跳转到指定的系统设置页面

2016-03-24  本文已影响3239人  Monkey_ALin

前言

在开发中, 我们有很多各式各样的需求需要用户跳转到系统的设置页进行设置. 比如IM关闭通知的声音,震动; VPN设置, 时间设置等等...

jump

 let settingUrl = NSURL(string: UIApplicationOpenSettingsURLString)!
 if UIApplication.sharedApplication().canOpenURL(settingUrl)
  {
         UIApplication.sharedApplication().openURL(settingUrl)
 }
About — prefs:root=General&path=About  
Accessibility — prefs:root=General&path=ACCESSIBILITY  
Airplane Mode On — prefs:root=AIRPLANE_MODE  
Auto-Lock — prefs:root=General&path=AUTOLOCK  
Brightness — prefs:root=Brightness  
Bluetooth — prefs:root=General&path=Bluetooth  
Date & Time — prefs:root=General&path=DATE_AND_TIME  
FaceTime — prefs:root=FACETIME  
General — prefs:root=General  
Keyboard — prefs:root=General&path=Keyboard  
iCloud — prefs:root=CASTLE  
iCloud Storage & Backup — prefs:root=CASTLE&path=STORAGE_AND_BACKUP  
International — prefs:root=General&path=INTERNATIONAL  
Location Services — prefs:root=LOCATION_SERVICES  
Music — prefs:root=MUSIC  
Music Equalizer — prefs:root=MUSIC&path=EQ  
Music Volume Limit — prefs:root=MUSIC&path=VolumeLimit  
Network — prefs:root=General&path=Network  
Nike + iPod — prefs:root=NIKE_PLUS_IPOD  
Notes — prefs:root=NOTES  
Notification — prefs:root=NOTIFICATIONS_ID  
Phone — prefs:root=Phone  
Photos — prefs:root=Photos  
Profile — prefs:root=General&path=ManagedConfigurationList  
Reset — prefs:root=General&path=Reset  
Safari — prefs:root=Safari  
Siri — prefs:root=General&path=Assistant  
Sounds — prefs:root=Sounds  
Software Update — prefs:root=General&path=SOFTWARE_UPDATE_LINK  
Store — prefs:root=STORE  
Twitter — prefs:root=TWITTER  
Usage — prefs:root=General&path=USAGE  
VPN — prefs:root=General&path=Network/VPN  
Wallpaper — prefs:root=Wallpaper  
Wi-Fi — prefs:root=WIFI  
Setting —prefs:root=INTERNET_TETHERING  

补充: 06-09:

跳转到应用对应的设置页:

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

联系我

<a href="https://github.com/SunLiner">github</a>

<a href="http://www.weibo.com/5589163526/profile?rightmod=1&wvr=6&mod=personinfo&is_all=1">微博</a>

<a href="http://www.jianshu.com/users/9723687edfb5/latest_articles">简书</a>

上一篇下一篇

猜你喜欢

热点阅读