@protocol HUBImageLoader <NSObject>

Protocol that objects that load images on behalf of the Hub Framework conform to

The Hub Framework uses an image loader to load images for components which models contain image data, when the component is about to be displayed on the screen. The framework itself does not employ any caching on images, so it’s up to each implementation of this protocol to handle that.

In case you don’t supply your own image loader implementation, the default HUBDefaultImageLoader is used.

See also HUBImageLoaderFactory which is used to create instances conforming to this protocol.

  • The image loader’s delegate. Don’t assign this property yourself, it will be set by the Hub Framework.



    @property (readwrite, nonatomic, nullable) id<HUBImageLoaderDelegate> delegate;
  • Load an image from a certain URL



    - (void)loadImageForURL:(nonnull NSURL *)imageURL targetSize:(CGSize)targetSize;



    The URL of the image to load


    The target size of the image. It’s up to the image loader to either resize the image accordingly, (if the loaded image has an incorrect size), or ignore this parameter.