SLImageView.h 963 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // SLImageView.h
  3. // WSLImageView
  4. //
  5. // Created by 王双龙 on 2018/10/26.
  6. // Copyright © 2018年 https://www.jianshu.com/u/e15d1f644bea. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "SLImage.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. /// 支持gif/png/jpg 等图片
  12. @interface SLImageView : UIImageView
  13. /** 当前帧索引 默认从0开始 */
  14. @property (nonatomic, assign) NSUInteger currentImageIndex;
  15. /** 是否自动播放动图 默认YES */
  16. @property (nonatomic, assign) BOOL autoPlayAnimatedImage;
  17. /** 当前是否正在动画 */
  18. @property (nonatomic, readonly) BOOL currentIsPlaying;
  19. /** 设置帧缓冲池最大内存空间(字节B) 默认根据当前内存大小动态计算适合的缓存大小 */
  20. @property (nonatomic, assign) NSUInteger maxBufferSize;
  21. /// 图片类型
  22. @property (nonatomic, assign, readonly) SLImageType imageType;
  23. /// 当前动图
  24. @property (nonatomic, strong, readonly) SLImage *animatedImage;
  25. @end
  26. NS_ASSUME_NONNULL_END