UIImage+ExtendedCacheData.m 677 B

123456789101112131415161718192021222324
  1. /*
  2. * This file is part of the SDWebImage package.
  3. * (c) Olivier Poitrey <rs@dailymotion.com>
  4. * (c) Fabrice Aneche
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. #import "UIImage+ExtendedCacheData.h"
  10. #import <objc/runtime.h>
  11. @implementation UIImage (ExtendedCacheData)
  12. - (id<NSObject, NSCoding>)sd_extendedObject {
  13. return objc_getAssociatedObject(self, @selector(sd_extendedObject));
  14. }
  15. - (void)setSd_extendedObject:(id<NSObject, NSCoding>)sd_extendedObject {
  16. objc_setAssociatedObject(self, @selector(sd_extendedObject), sd_extendedObject, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
  17. }
  18. @end