Convert image array to animated GIF
[HJImagesToGIF saveGIFFromImages:images toPath:path WithCallbackBlock:nil];
[HJImagesToGIF saveGIFToPhotoAlbumFromImages:images WithCallbackBlock:nil];
NSString *tempPath = [NSHomeDirectory() stringByAppendingPathComponent:
[NSString stringWithFormat:@"puppy.gif"]];
NSArray * images = [NSArray arrayWithObjects:[UIImage imageNamed:@"frame1.png"],
[UIImage imageNamed:@"frame2.png"],
[UIImage imageNamed:@"frame3.png"],
[UIImage imageNamed:@"frame4.png"],
[UIImage imageNamed:@"frame5.png"],
[UIImage imageNamed:@"frame6.png"], nil];
[HJImagesToGIF saveGIFFromImages:images toPath:tempPath WithCallbackBlock:^{
NSLog(@"Saved to file!");
}];
[HJImagesToGIF saveGIFToPhotoAlbumFromImages:images WithCallbackBlock:^{
NSLog(@"Saved to album!");
}];
Copyright 2013 Harrison Jackson http://harrisonjackson.us
Feel free to use however you want - if you make any improvements submit a pull request!