判断是否有相册、相机 权限

需要先导入头文件 

#import <AssetsLibrary/AssetsLibrary.h>

ALAuthorizationStatus author = [ALAssetsLibrary authorizationStatus];

    if( author == ALAuthorizationStatusRestricted || author == ALAuthorizationStatusDenied )

    {

        [SVProgressHUD showErrorWithStatus:@"您没有打开相册权限,请在设置里面打开相册权限"];

        

        return;

    }

你可能感兴趣的:(权限)