跳转到系统设置的其他界面
一. 先在跳转按钮的点击事件方法中添加如下代码:
NSURL*url = [NSURL URLWithString:@"prefs:root=WIFI"];
if ([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication] openURL:url];
}
二. 在项目中的 info 中添加 URL Types
三. 添加 URL Schemes 为 prefs 的 url
四. 现在你的app就可以跳转到系统设置的 WIFI 中去了
五. 跳转到其他的界面的字段, 只要更换参数就可以了
NSURL*url = [NSURL URLWithString:@"prefs:root=参数"];
if ([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication] openURL:url];
}
<p>
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
<p>
常用参数
英文 参数 中文
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=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 音效
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 INTERNET_TETHERING 无线网
Internet_tethering prefs:root= INTERNET_TETHERING 网络共享