zoukankan      html  css  js  c++  java
  • UI基础 UIIMageView

    #import "RootViewController.h"
    
    @interface RootViewController ()
    
    @end
    
    @implementation RootViewController
    
    - (void)viewDidLoad {
        [super viewDidLoad];
    
        //UIImageView 负责显示图片的类
        UIImageView* imageV=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 375, 667)];
    
        imageV.backgroundColor=[UIColor yellowColor];
        [self.view addSubview:imageV];
        //创建一个图片
        UIImage *ima=[UIImage imageNamed:@"a.jpg"];
        //显示
        imageV.image=ima;
        
        //逐帧动画
        //设置要播放的资源 (这些资源是图片 并且这些图片放到数组中)
        NSMutableArray* array=[NSMutableArray array];
        for(int i=0;i<=80;i++){
            //创建80张图片并添加到一个数组中  drink_%d.jpg 指文件路径下
            NSString* name=[NSString stringWithFormat:@"a.jpg"];
            UIImage *image=[UIImage imageNamed:name];
            [array addObject:image];
        }
        NSLog(@"%@",array);
        imageV.animationImages=array;
        //设置动画时间
        imageV.animationDuration=3;
        //设置重复次数
        imageV.animationRepeatCount=2;
        
        //启动动画
        [imageV startAnimating];
        
     
    }
    
    
    @end
  • 相关阅读:
    Bypass WAF
    一种简单的hook方法--LD_PRELOAD变量
    Linux C:access()时间条件竞争漏洞
    环境变量法提权
    sudo-tcpdump提权法
    asynico转载
    pychar 2020.1.2激活
    临时mysql 链接池
    python pip 使用阿里云镜像安装库
    zookeeper kafaka 临时保存
  • 原文地址:https://www.cnblogs.com/zhangqing979797/p/13342118.html
Copyright © 2011-2022 走看看