Index

RBImageView.h

Protocols

Classes


RBImageView

An image view with asynchronous image loading.

Properties

A delegate that can implement image transformation.
public weak delegate RBImageViewDelegate? { get set }

The aspect ratio of the image.
public aspectRatio CGFloat { get }

Whether or not activity indication should be showed while an image is being loaded asynchronously. Default = NO.
public shouldDisplayActivityDuringImageLoading Bool { get set }

Whether or not activity progress should be displayed where available when loading an image asynchronously. Default = NO.
public shouldDisplayActivityProgressDuringImageLoading Bool { get set }

An optional image that should be displayed if a failure occurs loading images via the 'loadImageFrom...' methods.
public failureImage UIImage? { get set }

The content mode of the failure image.
public failureImageContentMode UIViewContentMode { get set }

An optional image that should be displayed whilst an image is being download via the 'loadImageFrom...' methods.
public loadingImage UIImage? { get set }

The content mode of the loading image.
public loadingImageContentMode UIViewContentMode { get set }

Functions

Loads an image asynchronously from disk.
@param path : The filesystem path to the image file.
@param completion : An optional block that is called on completion.
- (void)imageFromDisk:(nonnull NSString *)path completion:(nullable void(^)(UIImage * __nullable image, NSError * __nullable error))completion;

Loads an image asynchronously from disk.
@param path : The filesystem path to the image file.
@param client : The RBImageCenter to use to for operations.
@param caching : Whether or not to cache the image or use a cached copy if possible.
@param completion : An optional block that is called on completion.
- (void)imageFromDisk:(nonnull NSString *)path withClient:(nonnull RBImageCenter *)client caching:(BOOL)caching completion:(nullable void(^)(UIImage * __nullable image, NSError * __nullable error))completion;

Loads an image asynchronously from the network using the shared RBImageCenter.
@param request : The NSURLRequest request to the image.
@param completion : An optional block that is called on completion.
- (void)imageFromRequest:(nonnull NSURLRequest *)request completion:(nullable void(^)(UIImage * __nullable image, NSError * __nullable error))completion;

Loads an image asynchronously from the network.
@param request : The NSURLRequest request to the image.
@param client : The RBImageCenter to use to for operations.
@param caching : Whether or not to cache the image or use a cached copy if possible.
@param completion : An optional block that is called on completion.
- (void)imageFromRequest:(nonnull NSURLRequest *)request withClient:(nonnull RBImageCenter *)client caching:(BOOL)caching completion:(nullable void(^)(UIImage * __nullable image, NSError * __nullable error))completion;