【问题标题】:iOS UIImageView animationImages display remote picturesiOS UIImageView动画图像显示远程图片
【发布时间】:2013-03-30 20:46:54
【问题描述】:

我有三个网址,就像“http://xxx.x.xx.xx:8180/admin/upload/advert/advert_img.jpg”,

它们是远程服务器中的图片。

我有一个 UIImageView,我想使用:

_imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0, 504.0, 320.0, 40.0)];
NSArray *images = [NSArray arrayWithObjects:[UIImage imageNamed:@"advert_img"],[UIImage imageNamed:@"img01"],[UIImage imageNamed:@"img02"], nil];
_imageView.animationImages = images;
_imageView.animationDuration = 15;
[_imageView startAnimating];

显示这些图片。我怎样才能做到这一点?非常感谢。

【问题讨论】:

  • 您好,我正在尝试做同样的任何解决方案

标签: uiimageview


【解决方案1】:

试试这个:

    NSArray *frames = [NSArray arrayWithObjects:
       [UIImage imageWithName:@"advert_img.png"],
       [UIImage imageWithName:@"img01.png"],
       [UIImage imageWithName:@"img02.png"],
       nil];

       UIImageView *animatedIMvw = [[UIImageView alloc] init];
       animatedIMvw.animationImages = frames;
       [animatedIMvw startAnimating];

【讨论】:

    猜你喜欢
    • 2012-01-01
    • 2014-04-11
    • 2013-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多