ASRangeController Class Reference

Inherits from ASDealloc2MainObject
Conforms to ASDataControllerDelegate
Declared in ASRangeController.h


Working range controller.

Used internally by ASTableView and ASCollectionView. It is paired with ASDataController. It is designed to support custom scrolling containers as well. Observes the visible range, maintains “working ranges” to trigger network calls and rendering, and is responsible for driving asynchronous layout of cells. This includes cancelling those asynchronous operations as cells fall outside of the working ranges.

– setNeedsUpdate

Notify the range controller that the visible range has been updated. This is the primary input call that drives updating the working ranges, and triggering their actions. The ranges will be updated in the next turn of the main loop, or when -updateIfNeeded is called.

- (void)setNeedsUpdate

Declared In


– updateIfNeeded

Update the ranges immediately, if -setNeedsUpdate has been called since the last update. This is useful because the ranges must be updated immediately after a cell is added into a table/collection to satisfy interface state API guarantees.

- (void)updateIfNeeded

Declared In


– configureContentView:forCellNode:

Add the sized node for indexPath as a subview of contentView.

- (void)configureContentView:(UIView *)contentView forCellNode:(ASCellNode *)node



UIView to add a (sized) node’s view to.


The cell node to be added.

Declared In



An object that describes the layout behavior of the ranged component (table view, collection view, etc.)

@property (nonatomic, strong) id<ASLayoutController> layoutController


Used primarily for providing the current range of index paths and identifying when the range controller should invalidate its range.

Declared In



The underlying data source for the range controller

@property (nonatomic, weak) id<ASRangeControllerDataSource> dataSource

Declared In



Delegate for handling range controller events. Must not be nil.

@property (nonatomic, weak) id<ASRangeControllerDelegate> delegate

Declared In