NSString *mediaType = AVMediaTypeVideo;
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];
if(authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied){
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"请在iPhone的 设置-隐私-相机 选项中,允许微阵访问你的相机" delegate:nil cancelButtonTitle:@"好" otherButtonTitles:nil, nil];
[alert show];
return;
}