访问相机权限弹框的点击方法获取
2021-07-26 本文已影响0人
_源计划
NSString *mediaType = AVMediaTypeVideo;//读取媒体类型
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];//读取设备授权状态
[AVCaptureDevice requestAccessForMediaType:mediaType completionHandler:^(BOOL granted) {
if (granted) {
NSLog(@"允许了");
}else
{
NSLog(@"拒绝了");
}
}];