您的位置:首页 > 移动开发 > IOS开发

ios save image to album

2014-07-07 18:56 267 查看
- (void)savePhotoToAlbum
{
    ZoomScrollView *zoomScrollView = (ZoomScrollView*)[self.scrollView
viewWithTag:BEGIN_TAG_FOR_IMAGE+self.currentImagePage];
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,
0), ^{
        UIImageWriteToSavedPhotosAlbum(zoomScrollView.imageView.image,
self, @selector(image:didFinishSavingWithError:contextInfo:),
nil);
    });
}

- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
    if (error == NULL) {
        dispatch_async(dispatch_get_main_queue(), ^{
//////////////
        });
    }
    else {
        //////////////////////////////////////
    }
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: