iOS用户是否开启定位服务

  CLAuthorizationStatus status = [CLLocationManager authorizationStatus];

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

        

        UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"提示" message:@"请打开您的位置服务" delegate:nilcancelButtonTitle:@"确定" otherButtonTitles:nilnil];

        [alert show];

    }

你可能感兴趣的:(ios)