将图片保存在一个数组中,通过UIImageWriteToSavedPhotosAlbum进行保存
//in the .h file put:
NSMutableArray *myPhotoArray;
///then in the .m
- (void) viewDidLoad {
myPhotoArray = [[NSMutableArray alloc]init];
}
//However Your getting images
- (void) someOtherMethod {
UIImage *someImage = [your prefered method of using this];
[myPhotoArray addObject:someImage];
}
-(void) saveMePlease {
//Loop through the array here
for (int i=0:i<[myPhotoArray count]:i++){
NSString *file = [myPhotoArray objectAtIndex:i];
NSString *path = [get the path of the image like you would in DOCS FOLDER or whatever];
NSString *imagePath = [path stringByAppendingString:file];
UIImage *image = [[[UIImage alloc] initWithContentsOfFile:imagePath]autorelease];
//Now it will do this for each photo in the array
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
}
}
分享到:
相关推荐
从monotouch和.net开发环境到objective-c和c#开发语言,从基于monotouch进行iphone开发的编程方法到应用程序的发布和销售等,《iPhone高级编程:使用Mono Touch和.NET/C#》涵盖了基于monotouch进行iphone应用程序...
详细代码编写调用iphone摄像头拍照摄像头并保存到相册
Anyone with programming experience can learn how to write an iPhone app. But if you want to build a great app, there’s a lot more to it than simple coding: you also need to know how design and ...
iPhone狂:约会iPhone
iPhone,读取全部相册图片
iPhone内存清理:删除微信垃圾缓存文件参考.pdf
iPhone开发秘籍:第2版(The iPhone Developer's Cookbook),英文版,清晰PDF版。iphone开发必备佳作,在第一版的基础上进行了全面修订和...iPhone开发的重量级参考书,揭示官方文档未详述的细节,代码示例清晰易懂。
More iPhone 3 Development: Tackling iPhone SDK 3
书中结合消费类设备上常见的实例,循序渐进地讲解了iPhone开发的基本流程,并介绍了最先进、时尚、受欢迎的iPhone特性。.(china-pub.com) 英文介绍:Are you a programmer looking for a new challenge? Does the ...
iOS仿iphone手机相册手势滑动多选照片功能,手势滑动多选UICollectionView的item
真iPhone玩家秘笈:一份靠谱的苹果手机指南
Whether you’re a self-taught iPhone development genius or have just made your way through the pages of Beginning iPhone 3 Development, we have the perfect book for you. More iPhone 3 Development: ...
PDF格式,添加了书签,英文版。中文译名为《iPhone开发基础教程》。
Iphone开发系列源码——Image图片缩放随着手指Iphone开发系列源码——Image图片缩放随着手指Iphone开发系列源码——Image图片缩放随着手指Iphone开发系列源码——Image图片缩放随着手指Iphone开发系列源码——Image...
iPhone in Action: Introduction to Web and SDK Development Paperback: 350 pages Publisher: Manning Publications (December 28, 2008) Language: English ISBN-10: 193398886X ISBN-13: 978-1933988863 Format...
博客《Mac/iPhone 多媒体(图片、音视频)处理》图床。
这是iPhone之手势切换图片示例程序,具体参考: http://blog.csdn.net/htttw/article/details/7881955
NULL 博文链接:https://lishuaishuai.iteye.com/blog/1009394