RBImageResponse Class Reference

Inherits from NSObject
Declared in RBImageResponse.h

Overview

The response of an image request operation.

  wasCancelled

Whether or not the operation was cancelled.

@property (nonatomic, readonly) BOOL wasCancelled

Declared In

RBImageResponse.h

  error

The error that occurred during the operation, or nil if no error occurred.

@property (nonatomic, readonly, nullable) NSError *error

Declared In

RBImageResponse.h

  image

The resulting image that was retrieved.

@property (nonatomic, readonly, nullable) UIImage *image

Declared In

RBImageResponse.h

  isDiskCacheHit

Whether or not the image was retrieved from the disk cache.

@property (nonatomic, readonly) BOOL isDiskCacheHit

Declared In

RBImageResponse.h

  isMemoryCacheHit

Whether or not the image was retrieved from the memory cache.

@property (nonatomic, readonly) BOOL isMemoryCacheHit

Declared In

RBImageResponse.h

  isCacheHit

Whether or not the image was retrieved from either the disk or the memory cache.

@property (nonatomic, readonly) BOOL isCacheHit

Declared In

RBImageResponse.h

  isValid

Whether or not the response is valid. A response is valid if no error occurred and it wasn’t cancelled.

@property (nonatomic, readonly) BOOL isValid

Declared In

RBImageResponse.h

+ responseWithImage:isDiskCacheHit:isMemoryCacheHit:

Creates a new image response with success.

+ (nonnull RBImageResponse *)responseWithImage:(nonnull UIImage *)image isDiskCacheHit:(BOOL)isDiskCacheHit isMemoryCacheHit:(BOOL)isMemoryCacheHit

Parameters

image

The retrieved image.

isDiskCacheHit

Whether or not the image was retrieved from the disk cache.

isMemoryCacheHit

Whether or not the image was retrieved from the memory cache.

Return Value

The new RBImageResponse object.

Declared In

RBImageResponse.h

+ responseWithError:

Creates a new image response with an error.

+ (nonnull RBImageResponse *)responseWithError:(nonnull NSError *)error

Parameters

error

The error that occurred.

Return Value

The new RBImageResponse object.

Declared In

RBImageResponse.h

+ wasCancelledResponse

Creates a new image response with cancellation.

+ (nonnull RBImageResponse *)wasCancelledResponse

Return Value

The new RBImageResponse object.

Declared In

RBImageResponse.h