In the project, we often encounter the need to use location. When the user set the app is not allowed to use the location, the best user experience is to directly switch to the location of the system settings interface, set.
First
Jump to your own project (in the need to reverse the action of the button to add the following code, will jump to the settings of their own app settings interface, there will be a notification and location permissions settings, if their own projects with the location of permissions, notification permissions, and other permissions, otherwise it will jump to the system settings interface)
Nsurl * url = [nsurl urlwithstring:uiapplicationopensettingsurlstring];
if([[[uiapplication sharedapplication] canopenurl: url]) {
nsurl*url =[nsurl urlwithstring:uiapplicationopensettingsurlstring]; [[uiapplication sharedapplication] openURL: url];
}
Second
Jump to other interfaces of system settings
For example skip to set WiFi interface
[[uiapplication sharedapplication] openURL: [nsurl urlwithstring:@ " Prefs:root=wifi "];
Add a URL to info in your project types
To jump to a different interface only need to set the Prefs field on the line prefs parameter name cannot be modified field corresponding value can be modified
About-prefs:root=general&path=about
Accessibility-prefs:root=general&path=accessibility
Airplanemodeon-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 Volumelimit-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
Softwareupdate-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
Reference article: http://www.jianshu.com/p/19602f48309b
iOS jump to System settings