将图片保存到本地
UIImageWriteToSavedPhotosAlbum(img, self , @selector(image:didFinishSavingWithError:contextInfo:), nil);
//图片保存成功后调用的方法
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {
//图片保存成功的事件
}