BU_SDImageAssetManager.h 973 B

1234567891011121314151617181920212223
  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 "BU_SDWebImageCompat.h"
  10. // Apple parse the Asset Catalog compiled file(`Assets.car`) by CoreUI.framework, however it's a private framework and there are no other ways to directly get the data. So we just process the normal bundle files :)
  11. @interface BU_SDImageAssetManager : NSObject
  12. @property (nonatomic, strong, nonnull) NSMapTable<NSString *, UIImage *> *imageTable;
  13. + (nonnull instancetype)sharedAssetManager;
  14. - (nullable NSString *)getPathForName:(nonnull NSString *)name bundle:(nonnull NSBundle *)bundle preferredScale:(nonnull CGFloat *)scale;
  15. - (nullable UIImage *)imageForName:(nonnull NSString *)name;
  16. - (void)storeImage:(nonnull UIImage *)image forName:(nonnull NSString *)name;
  17. @end