在UIWebview中加载gif图像-iPhone [英] Loading gif image in UIWebview - iPhone

查看:52
本文介绍了在UIWebview中加载gif图像-iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当Iam在iPhone 4.3模拟器的UIWebview中加载gif图像时,会出现类似

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)

并且gif图像未显示.谁能帮我...

And the gif image is not showing. Can anyone help me...

推荐答案

现在在 iPhone 中,Apple不支持 .gif 图像.
您可以使用其他类型的图像,例如png,jpg.

Now in iPhone, Apple not supported .gif images.
You can use other type of images like png, jpg..

如果要创建动画的图像系列,可以使用UIImageView轻松完成:

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];

这篇关于在UIWebview中加载gif图像-iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆