标签:
NSString *mediaType = AVMediaTypeVideo;//读取媒体类型
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];//读取设备授权状态
if(authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied){
UIAlertView * alert = [[UIAlertView alloc]initWithTitle:@"无法拍照" message:@"请在iPhone的“设置-隐私-相机”选项中,允许觅星访问你的手机相机" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil, nil];
[alert show];
return;
}
标签:
原文地址:http://www.cnblogs.com/huoran1120/p/5684067.html