好像基本只用來展示圖片叛甫。
屬性
self.imageView.image = [UIImage imageNamed:@"iconfont-nianhua-12"];
self.imageView.highlightedImage = [UIImage imageNamed:@"iconfont-nianhua-7"];
self.imageView.animationImages = arr;// 播放圖片數組
self.imageView.highlightedAnimationImages = arr;// 同上類似
self.imageView.animationDuration = arr.count * 0.1;// 播放一次循環(huán)的時間
self.imageView.animationRepeatCount = 0;// 0 無限循環(huán)
self.imageView.userInteractionEnabled = YES;// 用戶交互
self.imageView.tintColor = [UIColor redColor];
動畫
// 設置 高亮
[self.imageView setHighlighted:YES];
// 播放 停止
if (self.imageView.isAnimating) {
[self.imageView stopAnimating];
} else {
[self.imageView startAnimating];
}
// 或者
self.imageView.isAnimating ? [self.imageView stopAnimating] : [self.imageView startAnimating];
其他
@property (nonatomic) BOOL adjustsImageWhenAncestorFocused UIKIT_AVAILABLE_TVOS_ONLY(9_0);
@property(readonly,strong) UILayoutGuide *focusedFrameGuide UIKIT_AVAILABLE_TVOS_ONLY(9_0);
1