[英]How to present UIAlertView which contains Settings + Cancel button when location services are turned off in my app?
In one of my app I'm using Location Services. 在我的一个应用中,我正在使用位置服务。 I'm throwing a normal alert view whenever the location services are off like "Enable Your Location Services" with "OK" button when I open my app.
打开我的应用程序时,每当关闭位置服务(例如通过“确定”按钮的“启用您的位置服务”)时,我都会抛出正常的警报视图。 But I don't want this.
但我不要这个。 Rather I need to show the alert view as "Turn on Location Services to Allow Your_App_Name to Determine Your Location" with "Settings" and "Cancel" button as shown in the image.
相反,我需要使用“设置”和“取消”按钮将警报视图显示为“打开位置服务以允许Your_App_Name确定您的位置”,如图所示。 Give me the suggestions with a sample code, Thanks.
用示例代码给我建议,谢谢。
You should just pop up an UIAlertView telling the user that needs to enable Location Services. 您应该只弹出一个UIAlertView,告诉用户需要启用定位服务。
If you want to be more precise, you can always create a new View explaining the user how to enable location Services using graphical content, that makes it so much easier for the user. 如果您想更加精确,则始终可以创建一个新视图,向用户解释如何使用图形内容启用位置服务,这对用户而言非常容易。
You cannot open the Settings page from your app, and if you could, your app would be rejected on the app store. 您无法从应用程序打开“设置”页面,如果可以的话,您的应用程序将在应用商店中被拒绝。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.