定位服务iOS提醒回拨 [英] Location service iOS alert call back

查看:109
本文介绍了定位服务iOS提醒回拨的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们在应用程序中使用位置服务时,我们会收到一条iOS提醒,表示应用程序正在尝试使用当前位置 - 允许/不允许。

When we use location services in an application, we receive an iOS alert saying the application is trying to use the current location -- Allow/Don't Allow.

我们有一个代表回拨这些按钮吗?

Do we have a delegate call back for these buttons?

我想处理点击

推荐答案

您无法直接存取该快讯。

You don't have direct access to that alert.

如果用户按不允许,或者如果应用程序没有权限使用位置服务,则 CLLocationManager 将调用 locationManager:didFailWithError:。错误域将为 kCLErrorDomain ,错误代码将为 kCLErrorDenied

If the user presses "Don't Allow", or if the app otherwise doesn't have permission to use location services then CLLocationManager will call locationManager:didFailWithError: on its delegate. The error domain will be kCLErrorDomain and the error code will be kCLErrorDenied.

这篇关于定位服务iOS提醒回拨的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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