收藏图片,将图片保存到iphone本地图库中
来源:互联网 发布:语c软件 编辑:程序博客网 时间:2024/05/16 10:52
-(void)saveImage:(UIBarButtonItem *)sender{
/**
* 将图片保存到iPhone本地相册
* UIImage *image 图片对象
* id completionTarget 响应方法对象
* SEL completionSelector 方法
* void *contextInfo
*/
UIImageWriteToSavedPhotosAlbum(self.bigImgView.image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
}
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{
if(error == nil) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"message:@"已存入手机相册"delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定",nil];
[alert show];
}else{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"message:@"保存失败"delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
}
/**
* 将图片保存到iPhone本地相册
* UIImage *image 图片对象
* id completionTarget 响应方法对象
* SEL completionSelector 方法
* void *contextInfo
*/
UIImageWriteToSavedPhotosAlbum(self.bigImgView.image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
}
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{
if(error == nil) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"message:@"已存入手机相册"delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定",nil];
[alert show];
}else{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示"message:@"保存失败"delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定", nil];
[alert show];
}
}
0 0
- 收藏图片,将图片保存到iphone本地图库中
- Android将ImageView中的图片保存到本地图库
- 将图片保存到本地并刷新图库
- 保存图片到本地和系统图库
- Android保存图片到本地图库
- 将图片保存到系统图库
- 将图片保存到本地后,系统图库可以查看图片
- iOS 将图片保存到iPhone本地相册
- 将图片保存到本地
- 将网络图片保存在本地,并且出现在图库中
- 如何运用html5 canvas将图片保存至手机本地的图库中?
- FP10直接将图片保存到本地
- 将网络图片保存到本地
- 将图片保存到相册(本地)
- 将图片保存到本地相册
- wx.saveImageToPhotosAlbum将图片保存到本地
- 保存图片到系统图库,截图保存到系统图库
- ios 调用系统相机,图库,相册。将照片保存在相册,保存图片在本地,UIImagePickerController
- 从输入网址到显示网页的过程分析
- C++中的单例模式其实也不简单
- MongoDB & Redis的安装及配置
- Java的重写与调用父类方法问题
- 逻辑电路 - 继电器Relay
- 收藏图片,将图片保存到iphone本地图库中
- 【HDU5565 BestCoder Round 62 (div1)C】【STL or 二分答案 or 计数排序】Clarke and baton n个人减肥m次求最后异或值
- Ubuntu apt-get 版本依赖的问题
- BestCoder Round #62 (div.2) HDOJ5564 Clarke and digits(dp + 快速幂)
- 自定义圆形和圆角图片
- 师兄的vim配置(据说公司的人都用这个)
- linux下查看所有用户及所有用户组
- Ubuntu 12.04 KVM之VM动态迁移—iscsi存储
- 在Bundle中传递自定义的Arraylist<Object>