Http://blog.csdn.net/andypan1314/article/details/7218026
When you run the software for the first time after installation, the system prompts you whether to allow the software to obtain the current location. If you do not allow the software, the system does not prompt you to set the location during later running, which is inconvenient, the solution is to give the user an option to call up the "set" positioning service option on the iPhone, which is manually set by the user. The code for locating the service in the "Settings" of the system is called as follows:
[CPP] View
Plaincopy
- -(Ibaction) btnsetting :( ID) sender {
- Nsurl * url = [nsurl urlwithstring: @ "prefs: Root = location_services"];
- [[Uiapplication sharedapplication] Openurl: url];
- }
There are other commands that call system settings:
[Font =]
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 = icationications_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
The relevant call code is the same as the preceding example.
Reference: http://www.cocoachina.com/newbie/basic/2012/0116/3878.html