iphone / ipad dev - 如何以编程方式启动系统设置应用程序 [英] iphone/ipad dev - how to launch the system settings app programmatically

查看:149
本文介绍了iphone / ipad dev - 如何以编程方式启动系统设置应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在设置 - >常规中,有一个开关可以打开/关闭位置服务。在地图应用程序中,当位置服务关闭时,如果用户单击查找我按钮,它会弹出警报并要求用户在设置中打开位置服务。然后它退出应用程序并启动设置应用程序。如何在我的应用程序中以编程方式执行此操作?

In the settings -> general, there is a switch to turn on/off the location services. In the Maps app, when location services is off, if the user click on the find me button, it pops up an alert and asks the user to turn on location services in the settings. It then exits the app and launch the settings app. How can I do that programmatically in my app?

推荐答案

从iOS 5.0开始,您可以使用prefs以编程方式打开设置应用程序://URL方案。你在早期版本上运气不好。

As of iOS 5.0 you can open the settings app programmatically using the "prefs://" URL scheme. You are out of luck on earlier versions.

这篇关于iphone / ipad dev - 如何以编程方式启动系统设置应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆