IOS如何跳转系统设置

因为某些业务需要 app需要调到系统设置页面:

  • 方法一
    NSURL *url = [NSURLURLWithString:UIApplicationOpenSettingsURLString];
    if ([[UIApplicationsharedApplication] canOpenURL:url]) {
    //如果点击打开的话,需要记录当前的状态,从设置回到应用的时候会用到
    [[UIApplicationsharedApplication] openURL:url];
    }

  • 方法二

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=General"]]      
    

  • 附录
    IOS 系统设置 URL

(具体中文注释就备注了.看官应该都能看懂.)

prefs:root=General&path=About

prefs:root=General&path=ACCESSIBILITY

prefs:root=AIRPLANE_MODE

prefs:root=General&path=AUTOLOCK

prefs:root=General&path=USAGE/CELLULAR_USAGE

prefs:root=Brightness

prefs:root=General&path=Bluetooth

prefs:root=General&path=DATE_AND_TIME

prefs:root=FACETIME

prefs:root=General

prefs:root=General&path=Keyboard

prefs:root=CASTLE

prefs:root=CASTLE&path=STORAGE_AND_BACKUP

prefs:root=General&path=INTERNATIONAL

prefs:root=LOCATION_SERVICES

prefs:root=ACCOUNT_SETTINGS

prefs:root=MUSIC

prefs:root=MUSIC&path=EQ

prefs:root=MUSIC&path=VolumeLimit

prefs:root=General&path=Network

prefs:root=NIKE_PLUS_IPOD

prefs:root=NOTES

prefs:root=NOTIFICATIONS_ID

prefs:root=Phone

prefs:root=Photos

prefs:root=General&path=ManagedConfigurationList

prefs:root=General&path=Reset

prefs:root=Sounds&path=Ringtone

prefs:root=Safari

prefs:root=General&path=Assistant

prefs:root=Sounds

prefs:root=General&path=SOFTWARE_UPDATE_LINK

prefs:root=STORE

prefs:root=TWITTER

prefs:root=General&path=USAGE

prefs:root=VIDEO

prefs:root=General&path=Network/VPN

prefs:root=Wallpaper

prefs:root=WIFI

prefs:root=INTERNET_TETHERING

你可能感兴趣的:(IOS如何跳转系统设置)