ASMultiplexImageNode Class Reference

Inherits from ASImageNode : ASControlNode : ASDisplayNode : ASDealloc2MainObject
Declared in ASMultiplexImageNode.h

Overview

ASMultiplexImageNode begins loading images when its imageIdentifiers property is set. For each image identifier, the data source can either return a UIImage directly, or a URL the image node should load.

– initWithCache:downloader:

The designated initializer.

- (instancetype)initWithCache:(id<ASImageCacheProtocol>)cache downloader:(id<ASImageDownloaderProtocol>)downloader

Parameters

cache

The object that implements a cache of images for the image node.

downloader

The object that implements image downloading for the image node.

Return Value

An initialized ASMultiplexImageNode.

Discussion

If cache is nil, the receiver will not attempt to retrieve images from a cache before downloading them.

Declared In

ASMultiplexImageNode.h

  delegate

The delegate, which must conform to the ASMultiplexImageNodeDelegate protocol.

@property (nonatomic, readwrite, weak) id<ASMultiplexImageNodeDelegate> delegate

Declared In

ASMultiplexImageNode.h

  dataSource

The data source, which must conform to the ASMultiplexImageNodeDataSource protocol.

@property (nonatomic, readwrite, weak) id<ASMultiplexImageNodeDataSource> dataSource

Discussion

This value is required for ASMultiplexImageNode to load images.

Declared In

ASMultiplexImageNode.h

  downloadsIntermediateImages

Whether the receiver should download more than just its highest-quality image. Defaults to NO.

@property (nonatomic, readwrite, assign) BOOL downloadsIntermediateImages

Discussion

ASMultiplexImageNode immediately loads and displays the first image specified in imageIdentifiers (its highest-quality image). If that image is not immediately available or cached, the node can download and display lesser-quality images. Set downloadsIntermediateImages to YES to enable this behaviour.

Declared In

ASMultiplexImageNode.h

  imageIdentifiers

An array of identifiers representing various versions of an image for ASMultiplexImageNode to display.

@property (nonatomic, readwrite, copy) NSArray *imageIdentifiers

Discussion

An identifier can be any object that conforms to NSObject and NSCopying. The array should be in decreasing order of image quality – that is, the first identifier in the array represents the best version.

See Also

Declared In

ASMultiplexImageNode.h

– reloadImageIdentifierSources

Notify the receiver that its data source has new UIImages or NSURLs available for imageIdentifiers.

- (void)reloadImageIdentifierSources

Discussion

If a higher-quality image than is currently displayed is now available, it will be loaded.

Declared In

ASMultiplexImageNode.h

  loadedImageIdentifier

The identifier for the last image that the receiver loaded, or nil.

@property (nonatomic, readonly) id loadedImageIdentifier

Discussion

This value may differ from displayedImageIdentifier if the image hasn’t yet been displayed.

Declared In

ASMultiplexImageNode.h

  displayedImageIdentifier

The identifier for the image that the receiver is currently displaying, or nil.

@property (nonatomic, readonly) id displayedImageIdentifier

Declared In

ASMultiplexImageNode.h