判断手机app是否允许定位

来源:互联网 发布:word for mac 破解版 编辑:程序博客网 时间:2024/05/21 11:04

    CLAuthorizationStatus status = [CLLocationManagerauthorizationStatus];

    if (kCLAuthorizationStatusDenied == status ||kCLAuthorizationStatusRestricted == status) {

        ShowToastWithText(@"打开位置服务,将为您提供更好的服务");

    }else{

        NSLog(@"打开定位服务");

    }


0 0
原创粉丝点击