应用程序调用系统设置,并进入相关的设置项html
1.在iOS 5.1之前ios
能够使用URLs schemes,直接用openURL:打开app
例如:iphone
NSURL*url=[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"];测试
[[UIApplication sharedApplication] openURL:url];url
prefs:root=LOCATION_SERVICES 这就是URL 打开位置服务spa
相应的打开其余的 可搜素关键词”iOS 调用系统设置”rest
或者code
请见:htm
1.http://stackoverflow.com/questions/8246070/ios-launching-settings-restrictions-url-scheme?rq=1
2.http://blog.sina.com.cn/s/blog_983ef3f201011zel.html
2.在iOS 5.1之后
此方法被移除 详细:http://www.idownloadblog.com/2011/11/29/iphone-5-1-disables-shortcuts/
须要手动设置URL shcemes
如图:
详细:http://stackoverflow.com/questions/8246070/ios-launching-settings-restrictions-url-scheme?rq=1
3.iOS 8 之后
方法一:以上方法可用(测试环境:Xcode6.4 iOS8.4)
方法二:把URL 换成UIApplicationOpenSettingsURLString字段
此方法只能进入设置 不能进入更深一层的界面
4’其中prefs 更改成app-settings 也可进入设置 但不能更深刻
’
参考连接:
http://stackoverflow.com/questions/4496813/call-the-official-settings-app-from-my-app-on-iphone
http://stackoverflow.com/questions/8246070/ios-launching-settings-restrictions-url-scheme?rq=1
http://stackoverflow.com/questions/8246070/ios-launching-settings-restrictions-url-scheme
http://www.idownloadblog.com/2011/11/29/iphone-5-1-disables-shortcuts/