问题
When Iam loading a gif image in UIWebview in the iPhone 4.3 simulator it is getting an error like
ImageIO: <ERROR> _CGImagePluginInitGIFmalformed GIF frame#0 (640 x 960)
And the gif image is not showing. Can anyone help me...
回答1:
Now in iPhone, Apple not supported .gif
images.
You can use other type of images like png, jpg..
If you have a serie of images you want to animate you can easily do it with UIImageView:
UIImage *image1 = [UIImage imageNamed:@"image1.png"];
UIImage *image2 = [UIImage imageNamed:@"image2.png"];
UIImage *image3 = [UIImage imageNamed:@"image3.png"];
self.imageView.animationImages = [[NSArray alloc] initWithObjects:image1,image2,image3, nil];
self.imageView.animationRepeatCount = 7;
[self.imageView startAnimating];
来源:https://stackoverflow.com/questions/14727281/loading-gif-image-in-uiwebview-iphone