zoukankan      html  css  js  c++  java
  • 简单动画

    风火轮(菊花加载)

    1 // 加载旋转的菊花效果[UIActivityIndicatorView实现加载风火轮效果]
    2 // 无需设置frame
    3 UIActivityIndicatorView *indicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    4 indicatorView.center = self.view.center;
    5 [self.view addSubview:indicatorView];
    6 
    7 // 将风火轮启动
    8 [indicatorView startAnimating];

    Gif动画

     1 // 创建显示图片的ImageView
     2     UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 100, 400, 200)];
     3     [self.view addSubview:imgView];
     4     // 创建一个存储图片的数组
     5     NSMutableArray *saveImageArray = [NSMutableArray array];
     6     for (int i = 1; i < 12; i++) {
     7         NSString *imageName = [NSString stringWithFormat:@"2288dce40fe3c6723acdba8bd7177c73-%d(被拖移).tiff", i];
     8         UIImage *image = [UIImage imageNamed:imageName];
     9         [saveImageArray addObject:image];
    10     }
    11     // 设置GIF图片组
    12     imgView.animationImages = saveImageArray;
    13     // 设置播放速率
    14     imgView.animationDuration = 1.0f;
    15     // 设置播放次数(-1是无限播放)
    16     imgView.animationRepeatCount = -1;
    17     // 开启GIF动画
    18     [imgView startAnimating];
  • 相关阅读:
    maven+spark2.0.0最大连通分量
    Eclipse+maven+scala2.11.8+spark2.0.0的环境部署
    杀死mapreduce
    filter-自己的理解
    JS变量声明提升
    js==运算符强制转换规则
    html 文字间距
    如你所见,我开始用微博
    vue数据模拟
    vue项目目录介绍
  • 原文地址:https://www.cnblogs.com/crazygeek/p/5534409.html
Copyright © 2011-2022 走看看