how to trap the location alert response iphone

雨燕双飞 提交于 2019-12-21 20:38:54

问题


I am using GPS in iphone and it show conformation message for use location service. and i want to trap what user select "Allow" or "No". can any one suggest how i do this?

Thank


回答1:


You don't get a direct callback from this alert. However, if the user does not allow Core Location usage, you'll receive a -locationManager:didFailWithError: with a kCLErrorDenied error to your CLLocationManagerDelegate.

Since iOS 4.2, you can also listen to -locationManager:didChangeAuthorizationStatus: or check the authorizationStatus of CLLocationManager. This gives you a detailed status.



来源:https://stackoverflow.com/questions/3668214/how-to-trap-the-location-alert-response-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!