【发布时间】:2013-06-24 11:18:25
【问题描述】:
如何为来自网络服务的图像设置动画。我得到了为 bundle 中的图像设置动画的代码。如何从 url 中加载图像一个数组
该代码附在下面
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];
【问题讨论】:
-
下载图片,创建数组并设置
animationImages,这里有什么问题? -
有什么问题吗?看来代码不错
-
而问题是……
-
误导性和错误的标记,错误的标题 - 已标记。
标签: ios objective-c animation uiimageview