(IPhone/iPad) Code call the positioning service in "Settings" and other system-related function settings

Source: Internet
Author: User

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

  1. -(Ibaction) btnsetting :( ID) sender {
  2. Nsurl * url = [nsurl urlwithstring: @ "prefs: Root = location_services"];
  3. [[Uiapplication sharedapplication] Openurl: url];
  4. }


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.