Create an animated gif file from images in iOS