UIImageView常用属性和方法
来源:互联网 发布:阳炎ene软件 编辑:程序博客网 时间:2024/04/29 21:46
一、常用属性
1、image: default is nil。图片属性
2、highlightedImage: default is nil。高亮状态图片属性
3、userInteractionEnabled: default is NO。用户是否可以交互属性
4、highlighted: default is NO。判断图片是否是高亮状态
these allow a set of images to be animated. the array may contain multiple copies of the same(下面属性允许图像组动画,该数组内可能包含相同的多个副本)
5、animationImages: The array must contain UIImages. Setting hides the single image. default is nil。该数组当中必须包含多张图片,设置单张图片将被隐藏,默认 nil。
@property (nullable, nonatomic, copy) NSArray<UIImage *> *animationImages;
6、highlightedAnimationImages: The array must contain UIImages. Setting hides the single image. default is nil.高亮状态的组动画。
7、animationDuration: for one cycle of images. default is number of images * 1/30th of a second (i.e. 30 fps)。动画播放时间,对于一个周期的图像,默认的是图像是一秒30帧。
@property (nonatomic) NSTimeInterval animationDuration;
8、animationRepeatCount: 0 means infinite (default is 0)。动画循环次数。0意味着无限(默认0)。
@property (nonatomic) NSInteger animationRepeatCount;
9、tintColor: 给控件内子视图设置颜色。详细信息请见 UIImage类属性。
10、focusedFrameGuide: if adjustsImageWhenAncestorFocused is set, the image view may display its image in a larger frame when focused.this layout guide can be used to align other elements with the image view's focused frame.如果设置了adjustsImageWhenAncestorFocused,图像视图可以在一个更大的 frame 中显示其图片的焦点。这个布局指南,可用于将其他元素与图像视图的聚焦帧对齐。
@property(readonly,strong) UILayoutGuide *focusedFrameGuide;
二、常用方法
1、initWithImage::构造方法,在初始化对象时直接进行默认图片进行赋值。
- (instancetype)initWithImage: (nullable UIImage *)image;
2、initWithImage:highlightedImage:: 构造方法,在初始化对象时直接给默认和高亮图片进行赋值
- (instancetype)initWithImage: (nullable UIImage *)image highlightedImage: (nullable UIImage *)highlightedImage;
3、startAnimating::开始动画
- (void)startAnimating;
4、stopAnimating::结束动画
- (void)stopAnimating;
5、isAnimating:: 动画中
- (BOOL)isAnimating;
- UIImageView常用属性和方法
- UIImageView常用属性
- UIImageView 属性 方法
- IOS基本控件常用属性及方法(三)---UIImageView
- UIImageView的属性与方法
- IOS开发UI系列之常用控件 UILabel, UITextField, UIButton, UIImageView等常用属性与方法
- UIView UILabel UITextField UIButton UIImageView 常用属性
- ios开发总结之UIImageView常用属性
- UIImageView帧动画相关属性和方法和UIImage的2中加载方法
- JQuery 常用方法和属性
- DOM常用属性和方法
- DataGridView常用属性和方法
- OLE 常用方法和属性
- OLE 常用方法和属性
- OLE 常用方法和属性
- UILable常用属性和方法
- UIImage常用属性和方法
- UILable常用属性和方法
- nyoj_5 Binary String Matching
- 理解伪元素和伪类
- Android学习笔记(一)——Activity基础知识
- 使用OpenCV与Face++实现人脸解锁
- MAPI over HTTP和RPC over HTTP的区别
- UIImageView常用属性和方法
- HttpURLconnection上传数据
- array_count_values.php
- 常见问题修改方法
- 【LeetCode】LeetCode——第21题:Merge Two Sorted Lists
- 微信支付之二三事
- 大数据日志分析logstash\elasticsearch\kibana
- 理解ThreadLocal
- avalon1.5学习笔记