SDWebImageFrame.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * This file is part of the SDWebImage package.
  3. * (c) Olivier Poitrey <rs@dailymotion.com>
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. #import <Foundation/Foundation.h>
  9. #import "SDWebImageCompat.h"
  10. @interface SDWebImageFrame : NSObject
  11. // This class is used for creating animated images via `animatedImageWithFrames` in `SDWebImageCoderHelper`. Attention if you need to specify animated images loop count, use `sd_imageLoopCount` property in `UIImage+MultiFormat`.
  12. /**
  13. The image of current frame. You should not set an animated image.
  14. */
  15. @property (nonatomic, strong, readonly, nonnull) UIImage *image;
  16. /**
  17. The duration of current frame to be displayed. The number is seconds but not milliseconds. You should not set this to zero.
  18. */
  19. @property (nonatomic, readonly, assign) NSTimeInterval duration;
  20. /**
  21. Create a frame instance with specify image and duration
  22. @param image current frame's image
  23. @param duration current frame's duration
  24. @return frame instance
  25. */
  26. + (instancetype _Nonnull)frameWithImage:(UIImage * _Nonnull)image duration:(NSTimeInterval)duration;
  27. @end