首页 > 其他 > 详细

判断当前有无给应用授权定位功能

时间:2017-01-06 15:08:33      阅读:158      评论:0      收藏:0      [点我收藏+]
if ([CLLocationManager locationServicesEnabled] && ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorizedWhenInUse || [CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined || [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized)) {
        
        //定位功能可用
        NSLog(@"定位功能可用");
        
    } else if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusDenied) {
        
        //定位不能用
        NSLog(@"定位功能不可用");
    }

 

判断当前有无给应用授权定位功能

原文:http://www.cnblogs.com/dabaomo/p/6256294.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!