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

需要先导入头文件 

#import <AssetsLibrary/AssetsLibrary.h>

ALAuthorizationStatus author = [ALAssetsLibrary authorizationStatus];

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

    {

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

        

        return;

    }

posted on 2015-06-03 23:29  景树园  阅读(228)  评论(0编辑  收藏  举报

导航