01-UI基础-03UIImageView

原创
2016/01/04 16:58
阅读数 59

##继承关系

##初始化 ###1.Image 设置图片,默认显示

UIImageView *_imageView = [[UIImageView alloc]init];
_imageView.image = [UIImage imageNamed:@"me.png"];

###2.highlightedImage 设置高亮状态下显示的图片

_imageView.highlightedImage = [UIImage imageNamed:@"other.png"];

动画相关

###3.animationImages 设置序列帧动画的图片数组

[_imageView setAnimationImages:[NSArray array]];

###4.highlightedAnimationImages 设置高亮状态下序列帧动画的图片数组

[_imageView setHighlightedAnimationImages:[NSArray array]];

###5.animationDuration 设置序列帧动画播放的时常

[_imageView setAnimationDuration:0.3f];

###6.animationRepeatCount 设置序列帧动画播放的次数

[_imageView setAnimationRepeatCount:2];

###7.开始动画

- (void)startAnimating

###8.停止动画

- (void)stopAnimating

###9.是否在执行动画

- (BOOL)isAnimating

##设置和获取属性 ###10.userInteractionEnabled(交互) 设置是否允许用户交互,默认不允许用户交互

[_imageView setUserInteractionEnabled:YES];

###11.highlighted(高亮) 设置是否为高亮状态,默认为普通状态

_imageView.highlightedImage = [UIImage imageNamed:@"other.png"];
[_imageView setHighlighted:YES];

注意的是在highlighted状态下设置的图片与序列帧动画要显示,必须同时设置UIImageView的状态为highlighted。 ###12. tintColor A color used to tint template images in the view hierarchy.

展开阅读全文
加载中

作者的其它热门文章

打赏
0
1 收藏
分享
打赏
0 评论
1 收藏
0
分享
返回顶部
顶部