ios开发 什么会调用获取相机,麦克风权限

发布网友 发布时间:2024-10-24 02:43

我来回答

1个回答

热心网友 时间:2024-11-06 06:05

判断相机的
AVAuthorizationStatus status = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];

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

return NO;

} else {

return YES;

}
判断相册的
ALAuthorizationStatus status = [ALAssetsLibrary authorizationStatus];

if (status == kCLAuthorizationStatusDenied || kCLAuthorizationStatusRestricted) {

return NO;

} else {

return YES;

}

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com