zoukankan      html  css  js  c++  java
  • iOS制作gif动态图

        NSMutableArray * array = [NSMutableArray array];    

        for (int i = 1; i < 6; i++) {

        NSString * string = [NSString stringWithFormat:@"hehua0%d",i];

            UIImage * image = [UIImage imageNamed:string];

            [array addObject:image];

        }

        self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 100, 200, 200)];

        //设置动画图片

        self.imageView.animationImages = array;

        //动画时间

        self.imageView.animationDuration = 1;

        //动画播放重复次数,值为0时,无限循环

        self.imageView.animationRepeatCount = 0;

        //开始动画

        [self.imageView startAnimating];

        [self.view addSubview:self.imageView];

  • 相关阅读:
    02-cocoapods的安装和使用
    01-唐巧之cocoapods
    class0513(html)
    程序集
    c#面向对象
    html
    dom
    Javascript
    Jquery
    ado.net
  • 原文地址:https://www.cnblogs.com/PSSSCode/p/5268693.html
Copyright © 2011-2022 走看看