在需要調(diào)轉(zhuǎn)的按鈕動(dòng)作中添加如下的代碼五督,就會(huì)跳轉(zhuǎn)到設(shè)置中自己的app的設(shè)置界面咏雌,這里會(huì)有通知和位置權(quán)限的設(shè)置
NSURL * url = [NSURLURLWithString:UIApplicationOpenSettingsURLString];
if([[UIApplicationsharedApplication] canOpenURL:url]) {
NSURL*url =[NSURLURLWithString:UIApplicationOpenSettingsURLString]; ? ? ? ? ? [[UIApplicationsharedApplication] openURL:url];
}
測(cè)試注意:新項(xiàng)目測(cè)試询张,需要請(qǐng)求一下位置權(quán)限或者通知權(quán)限倔监,才可以跳進(jìn)自己的app設(shè)置里面,如果沒(méi)有任何權(quán)限請(qǐng)求幌陕,就只能跳到系統(tǒng)的設(shè)置界面
跳轉(zhuǎn)到系統(tǒng)設(shè)置的其他界面
在點(diǎn)擊跳轉(zhuǎn)的按鈕動(dòng)作中添加如下代碼
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]];
在項(xiàng)目中的info中添加 URL types
添加 URL Schemes 為 prefs的url
這樣點(diǎn)擊就可以跳轉(zhuǎn)到wifi設(shè)置界面
(測(cè)試手機(jī) 5c 8.3系統(tǒng) 5s 7.1系統(tǒng))
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