检测用户是否禁用摄像头

UIImagePickerController .m   文件中加入方法

```

//如果相机权限受到限制会执行

NSString*mediaType =AVMediaTypeVideo;

AVAuthorizationStatusauthStatus = [AVCaptureDeviceauthorizationStatusForMediaType:mediaType];

if(authStatus ==AVAuthorizationStatusRestricted|| authStatus ==AVAuthorizationStatusDenied){

NSLog(@"相机权限受限");

```

你可能感兴趣的:(检测用户是否禁用摄像头)