好像基本只用来展示图片。
属性
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;// 播放一次循环的时间
self.imageView.animationRepeatCount = 0;// 0 无限循环
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