开发者

Sending requests when user answer "App wants to use location services"

I'm using Core Location in my app, app asks user if he wants to use Location services, but I use in my app async requests, so app doesn't wait while user answer "Ok" or "dismiss".开发者_如何学Go Ho can I prevent this? I want that my request will be send when user taps "OK". Thank you


In iOS 4.2 and up, your delegate will receive a message locationManager:didChangeAuthorizationStatus: when the authorization status changes (i.e. the user responds to the dialog, or the user backgrounds your app and goes into Settings and changes the global location settings). If you support earlier versions, you'll have to fall back to guessing based on locationManager:didUpdateToLocation:fromLocation: and locationManager:didFailWithError: messages (especially the NSError code kCLErrorDenied in the latter).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜