ASCollectionNode Class Reference

Inherits from ASDisplayNode : ASDealloc2MainObject
Declared in ASCollectionNode.h

Overview

ASCollectionNode is a node based class that wraps an ASCollectionView. It can be used as a subnode of another node, and provide room for many (great) features and improvements later on.

  view

Returns a view.

@property (strong, nonatomic, readonly) ASCollectionView *view

Discussion

The view property is lazily initialized, similar to UIViewController. To go the other direction, use ASViewToDisplayNode() in ASDisplayNodeExtras.h.

Warning: The first access to it must be on the main thread, and should only be used on the main thread thereafter as well.

Declared In

ASDisplayNode.h

– tuningParametersForRangeType:

Tuning parameters for a range type in full mode.

- (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType

Parameters

rangeType

The range type to get the tuning parameters for.

Return Value

A tuning parameter value for the given range type in full mode.

Declared In

ASCollectionNode.h

– setTuningParameters:forRangeType:

Set the tuning parameters for a range type in full mode.

- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType

Parameters

tuningParameters

The tuning parameters to store for a range type.

rangeType

The range type to set the tuning parameters for.

Declared In

ASCollectionNode.h

– tuningParametersForRangeMode:rangeType:

Tuning parameters for a range type in the specified mode.

- (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType

Parameters

rangeMode

The range mode to get the running parameters for.

rangeType

The range type to get the tuning parameters for.

Return Value

A tuning parameter value for the given range type in the given mode.

Declared In

ASCollectionNode.h

– setTuningParameters:forRangeMode:rangeType:

Set the tuning parameters for a range type in the specified mode.

- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType

Parameters

tuningParameters

The tuning parameters to store for a range type.

rangeMode

The range mode to set the running parameters for.

rangeType

The range type to set the tuning parameters for.

Declared In

ASCollectionNode.h

– reloadDataWithCompletion:

Reload everything from scratch, destroying the working range and all cached nodes.

- (void)reloadDataWithCompletion:(void ( ^ ) ( ))completion

Parameters

completion

block to run on completion of asynchronous loading or nil. If supplied, the block is run on the main thread.

Discussion

Warning: This method is substantially more expensive than UICollectionView’s version.

Declared In

ASCollectionNode.h

– reloadData

Reload everything from scratch, destroying the working range and all cached nodes.

- (void)reloadData

Discussion

Warning: This method is substantially more expensive than UICollectionView’s version.

Declared In

ASCollectionNode.h

– reloadDataImmediately

Reload everything from scratch entirely on the main thread, destroying the working range and all cached nodes.

- (void)reloadDataImmediately

Discussion

Warning: This method is substantially more expensive than UICollectionView’s version and will block the main thread while all the cells load.

Declared In

ASCollectionNode.h