我需要从UIImageview中的URL加载动画Gif图像.
当我使用普通代码时,图像没有加载.
有没有其他方法可以加载动画Gif图像?
我需要从UIImageview中的URL加载动画Gif图像.
当我使用普通代码时,图像没有加载.
有没有其他方法可以加载动画Gif图像?
UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
animatedImageView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"image1.gif"],
[UIImage imageNamed:@"image2.gif"],
[UIImage imageNamed:@"image3.gif"],
[UIImage imageNamed:@"image4.gif"], nil];
animatedImageView.animationDuration = 1.0f;
animatedImageView.animationRepeatCount = 0;
[animatedImageView startAnimating];
[self.view addSubview: animatedImageView];
您可以加载多个gif图像.
您可以使用以下ImageMagick命令拆分gif:
convert +adjoin loading.gif out%d.gif