iphone 保存图片到相册照片库
来源:互联网 发布:推荐书目 知乎 编辑:程序博客网 时间:2024/04/29 02:17
已知图片保存到相册
UIImageWriteToSavedPhotosAlbum([UIImage imageNamed:photoName], self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
UIAlertView *alert;
if (error == nil)
{
alert = [[UIAlertView alloc] initWithTitle:nil message:@"This picture has been saved to your photo album.Picture Saved!" delegate:nilcancelButtonTitle:@"OK." otherButtonTitles:nil];
[alert show];
[alert release];
}
else
{
alert = [[UIAlertView alloc] initWithTitle:nil message:@"Please try it again later.Saving Failed" delegate:nilcancelButtonTitle:@"OK." otherButtonTitles:nil];
[alert show];
[alert release];
}
}
保存当前视图:
#import <QuartzCore/QuartzCore.h>
UIGraphicsBeginImageContext(currentView.bounds.size); //currentView当前的view
[currentView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
- iphone 保存图片到相册照片库
- 保存照片到相册
- 保存图片到相册 iphone UIImageWriteToSavedPhotosAlbum 保存图片
- iOS-将图片保存到照片相册中
- iPhone应用程序 将图片保存到相册实例
- iPhone应用程序 将图片保存到相册实例
- iOS 将图片保存到iPhone本地相册
- 保存图片到相册
- 保存图片到相册
- 保存图片到相册
- 保存图片到相册
- 保存图片到相册
- 保存图片到相册
- 保存图片到相册
- 保存图片到相册
- ios 保存图片到系统照片库
- ALAssetsLibrary---保存照片到指定相册
- 保存照片和视频到相册显示
- nagios check_oracle
- delphi 如何运行bat文件
- 解决本地文本文件上传到服务器乱码问题(C#),ANSI转UTF-8编码
- ezgui 与 ngui的对比
- exec 和 call 用法详解
- iphone 保存图片到相册照片库
- 透析回调函数
- typedef的语法描述
- HDU Image Recognition
- webView的使用及其乱码问题的解决方案
- J2SE基础夯实系列之equals 和 ==的两个特殊例子
- python 异常处理
- 文件内存映射
- 求用一维数组表示的矩阵的乘积