ASMultiplexImageNode Class Reference

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

Overview

ASMultiplexImageNode begins loading images when its resource can either return a UIImage directly, or a URL the image node should load.

– initWithCache:downloader:

The designated initializer.

- (instancetype)initWithCache:(nullable id<ASImageCacheProtocol>)cache downloader:(nullable 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<ASImageIdentifier> *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 SSAA 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 (nullable, nonatomic, readonly) ASImageIdentifier 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 (nullable, nonatomic, readonly) ASImageIdentifier displayedImageIdentifier

Declared In

ASMultiplexImageNode.h

  shouldRenderProgressImages

If the downloader implements progressive image rendering and this value is YES progressive renders of the image will be displayed as the image downloads. Regardless of this properties value, progress renders will only occur when the node is visible. Defaults to YES.

@property (nonatomic, assign, readwrite) BOOL shouldRenderProgressImages

Declared In

ASMultiplexImageNode.h

  imageManager

  • @abstract The image manager that this image node should use when requesting images from the Photos framework. If this is nil (the default), then PHImageManager.defaultManager is used.
@property (nullable, nonatomic, strong) PHImageManager *imageManager

Discussion

  • @see +[NSURL URLWithAssetLocalIdentifier:targetSize:contentMode:options:] below.

Declared In

ASMultiplexImageNode.h