标签:
UIImageView *_imageView = [[UIImageView alloc]init];
_imageView.image = [UIImage imageNamed:@"me.png"];
_imageView.highlightedImage = [UIImage imageNamed:@"other.png"];
[_imageView setAnimationImages:[NSArray array]];
[_imageView setHighlightedAnimationImages:[NSArray array]];
[_imageView setAnimationDuration:0.3f];
[_imageView setAnimationRepeatCount:2];
[_imageView setUserInteractionEnabled:YES];
_imageView.highlightedImage = [UIImage imageNamed:@"other.png"];
[_imageView setHighlighted:YES];
注意的是在highlighted状态下设置的图片与序列帧动画要显示,必须同时设置UIImageView的状态为highlighted。
标签:
原文地址:http://www.cnblogs.com/CJDog/p/4742154.html