//第一步判断用户是非开启授权访问相册
ALAuthorizationStatus author = [ALAssetsLibrary authorizationStatus];
if (author == kCLAuthorizationStatusRestricted || author==kCLAuthorizationStatusDenied)
{ //无权限
.........
//没有授权的情况下,判断设备版本是否为8.0以上,是的可以对系统弹出的提示页面进行设置,添加一个“前往设置”的按钮,,,
if (IOS_VERSION >= 8.0) {
//跳转到设置
if (UIApplicationOpenSettingsURLString != NULL) {
NSURL *appSettings = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication sharedApplication] openURL:appSettings];
}
}
}