WBBaiSiDemo icon indicating copy to clipboard operation
WBBaiSiDemo copied to clipboard

UIImageView 加载 gif

Open fsresponser opened this issue 9 years ago • 2 comments

UIImageView 怎么实现加载远程gif图片的?

fsresponser avatar Feb 23 '16 05:02 fsresponser

这个是框架里带的 他会先拿出图片data的前八位字节 判断是什么类型,如果是gif图片的话,会调用imageview的以下方法

@property (nullable, nonatomic, copy) NSArray<UIImage *> *animationImages; // The array must contain UIImages. Setting hides the single image. default is nil
@property (nonatomic) NSTimeInterval animationDuration;         // for one cycle of images. default is number of images * 1/30th of a second (i.e. 30 fps)
@property (nonatomic) NSInteger      animationRepeatCount;      // 0 means infinite (default is 0)

- (void)startAnimating;

chatwyn avatar Feb 23 '16 08:02 chatwyn

好的,这个应该是2.0.x的breaking change

fsresponser avatar Feb 24 '16 07:02 fsresponser