需要先导入头文件
#import <AssetsLibrary/AssetsLibrary.h>
ALAuthorizationStatus author = [ALAssetsLibrary authorizationStatus];
if( author == ALAuthorizationStatusRestricted || author == ALAuthorizationStatusDenied )
{
[SVProgressHUD showErrorWithStatus:@"您没有打开相册权限,请在设置里面打开相册权限"];
return;
}
时间: 2024-12-30 01:56:54