ASRangeControllerDataSource Protocol Reference

Conforms to NSObject
Declared in ASRangeController.h

Overview

Data source for ASRangeController.

Allows the range controller to perform external queries on the range. Ex. range nodes, visible index paths, and viewport size.

– visibleNodeIndexPathsForRangeController: required method

Sender.

- (NSArray<NSIndexPath*> *)visibleNodeIndexPathsForRangeController:(ASRangeController *)rangeController

Parameters

rangeController

Sender.

Return Value

an array of index paths corresponding to the nodes currently visible onscreen (i.e., the visible range).

Declared In

ASRangeController.h

– scrollDirectionForRangeController: required method

Sender.

- (ASScrollDirection)scrollDirectionForRangeController:(ASRangeController *)rangeController

Parameters

rangeController

Sender.

Return Value

the current scroll direction of the view using this range controller.

Declared In

ASRangeController.h

– viewportSizeForRangeController: required method

Sender.

- (CGSize)viewportSizeForRangeController:(ASRangeController *)rangeController

Parameters

rangeController

Sender.

Return Value

the receiver’s viewport size (i.e., the screen space occupied by the visible range).

Declared In

ASRangeController.h

– interfaceStateForRangeController: required method

Sender.

- (ASInterfaceState)interfaceStateForRangeController:(ASRangeController *)rangeController

Parameters

rangeController

Sender.

Return Value

the ASInterfaceState of the node that this controller is powering. This allows nested range controllers to collaborate with one another, as an outer controller may set bits in .interfaceState such as Visible. If this controller is an orthogonally scrolling element, it waits until it is visible to preload outside the viewport.

Declared In

ASRangeController.h