开发者

How to use the CLLocationManager to update location without asking user to enable the service?

Is there any way to test the user location service is enabled or not without asking user?

What I want to do is to use the user location information if the service is already on, or not to use it if the service is off. I don't want to ask user to enabl开发者_StackOverflow社区e the service.

Is there any method to do this trick?

Thanks.


Yes, use locationServicesEnabled

if ([CLLocationManager locationServicesEnabled]) {
    // do you stuff
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜