zoukankan      html  css  js  c++  java
  • UIImageView

     1 1.Image 设置图片,默认显示
     2  UIImageView *_imageView = [[UIImageView alloc]init];
     3 
     4 _imageView.image = [UIImage imageNamed:@"me.png"];
     5 
     6 
     7 2.highlightedImage 设置高亮状态下显示的图片
     8 _imageView.highlightedImage = [UIImage imageNamed:@"other.png"];
     9 
    10 3.animationImages 设置序列帧动画的图片数组
    11  [_imageView setAnimationImages:[NSArray array]];
    12 4.highlightedAnimationImages 设置高亮状态下序列帧动画的图片数组
    13 [_imageView setHighlightedAnimationImages:[NSArray array]];
    14 
    15 5.animationDuration 设置序列帧动画播放的时常
    16 [_imageView setAnimationDuration:0.3f];
    17 6.animationRepeatCount 设置序列帧动画播放的次数
    18 [_imageView setAnimationRepeatCount:2];
    19 7.userInteractionEnabled 设置是否允许用户交互,默认不允许用户交互
    20 [_imageView setUserInteractionEnabled:YES];
    21 
    22 8.highlighted 设置是否为高亮状态,默认为普通状态
    23 _imageView.highlightedImage = [UIImage imageNamed:@"other.png"];
    24 [_imageView setHighlighted:YES];
    25 
    26 
    27 注意的是在highlighted状态下设置的图片与序列帧动画要显示,必须同时设置UIImageView的状态为highlighted。
  • 相关阅读:
    springMvc
    计算机网络
    Mybatis 总结
    Spring 面试总结
    Java IO 流
    自定义类加载器
    缓存一致性协议
    dfs、bfs序
    7.26
    Trick
  • 原文地址:https://www.cnblogs.com/developer-wang/p/4527052.html
Copyright © 2011-2022 走看看