/* ios 11 */
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
if (status == PHAuthorizationStatusNotDetermined || status == PHAuthorizationStatusAuthorized) {
[selfshowActionView];
}else{
dispatch_async(dispatch_get_main_queue(), ^{
[self.parentControllershowMessageHUD:@"请打开摄像头和相册权限"];
});
}
}];
/* ios 10 和 ios10以下 */
PHAuthorizationStatus photoAuthorizationStatus = [PHPhotoLibrary authorizationStatus];
switch(photoAuthorizationStatus) {
casePHAuthorizationStatusAuthorized:
{
[selfshowActionView];
break;
}
default:
{
[self.parentController showMessageHUD:@"请打开摄像头和相册权限"];
break;
}
}