Inherits from NSObject
Declared in AKImageCoordinator.h
AKImageCoordinator.m

Overview

The AKImageCoordinator class is a convenient way to ensure that a specific image renderer will produce an appropriately-sized image for displaying in an image view.

Typically, you will have a reference to an AKImageCoordinator in a UIViewController class. Then, in the -viewWillAppear: method of your view controller, you’ll call addImageView: on the image coordinator, which will take care of setting the appropriate image value. Similarly, in your implementation of -viewWillDisappear:, you’ll call removeImageView: with the image view to absolve the image coordinator of responsibility for rendering images for off-screen views.

Tasks

Configuring the Image Coordinator

  •   imageRenderer

    The image renderer to use when creating images for an image view.

    property

Adding and Removing Image Views

  • – addImageView:

    Adds an image view to the image coordinator. When the image view’s frame changes, the image coordinator will automatically re-render the image.

  • – removeImageView:

    Removes an image view from the image coordinator. This will not clear the current image in the image view, but will prevent the image coordinator from re-rendering images if the image view’s frame changes.

Properties

imageRenderer

The image renderer to use when creating images for an image view.

@property (strong, nonatomic) AKImageRenderer *imageRenderer

Declared In

AKImageCoordinator.h

Instance Methods

addImageView:

Adds an image view to the image coordinator. When the image view’s frame changes, the image coordinator will automatically re-render the image.

- (void)addImageView:(UIImageView *)imageView

Parameters

imageView

The image view for which the image coordinator will render images.

Declared In

AKImageCoordinator.h

removeImageView:

Removes an image view from the image coordinator. This will not clear the current image in the image view, but will prevent the image coordinator from re-rendering images if the image view’s frame changes.

- (void)removeImageView:(UIImageView *)imageView

Parameters

imageView

The image view for which the image coordinator will no longer render images.

Declared In

AKImageCoordinator.h