SDImageFrame.m 855 B

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 "SDImageFrame.h"
  9. @interface SDImageFrame ()
  10. @property (nonatomic, strong, readwrite, nonnull) UIImage *image;
  11. @property (nonatomic, readwrite, assign) NSTimeInterval duration;
  12. @end
  13. @implementation SDImageFrame
  14. - (instancetype)initWithImage:(UIImage *)image duration:(NSTimeInterval)duration {
  15. self = [super init];
  16. if (self) {
  17. _image = image;
  18. _duration = duration;
  19. }
  20. return self;
  21. }
  22. + (instancetype)frameWithImage:(UIImage *)image duration:(NSTimeInterval)duration {
  23. SDImageFrame *frame = [[SDImageFrame alloc] initWithImage:image duration:duration];
  24. return frame;
  25. }
  26. @end