开发者

how to trap the location alert response iphone

开发者 https://www.devze.com 2023-01-15 01:57 出处:网络
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\".

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消