1 1.Image 設(shè)置圖片,默認顯示
2 UIImageView *_imageView = [[UIImageView alloc]init];
3
4 _imageView.image = [UIImage imageNamed:@"me.png"];
5
6
7 2.highlightedImage 設(shè)置高亮狀態(tài)下顯示的圖片
8 _imageView.highlightedImage = [UIImage imageNamed:@"other.png"];
9
10 3.animationImages 設(shè)置序列幀動畫的圖片數(shù)組
11 [_imageView setAnimationImages:[NSArray array]];
12 4.highlightedAnimationImages 設(shè)置高亮狀態(tài)下序列幀動畫的圖片數(shù)組
13 [_imageView setHighlightedAnimationImages:[NSArray array]];
14
15 5.animationDuration 設(shè)置序列幀動畫播放的時常
16 [_imageView setAnimationDuration:0.3f];
17 6.animationRepeatCount 設(shè)置序列幀動畫播放的次數(shù)
18 [_imageView setAnimationRepeatCount:2];
19 7.userInteractionEnabled 設(shè)置是否允許用戶交互,默認不允許用戶交互
20 [_imageView setUserInteractionEnabled:YES];
21
22 8.highlighted 設(shè)置是否為高亮狀態(tài),默認為普通狀態(tài)
23 _imageView.highlightedImage = [UIImage imageNamed:@"other.png"];
24 [_imageView setHighlighted:YES];
25
26
27 注意的是在highlighted狀態(tài)下設(shè)置的圖片與序列幀動畫要顯示,必須同時設(shè)置UIImageView的狀態(tài)為highlighted。