ASPagerDataSource Protocol Reference

Conforms to NSObject
Declared in ASPagerNode.h

– numberOfPagesInPagerNode: required method

This method replaces -collectionView:numberOfItemsInSection:

- (NSInteger)numberOfPagesInPagerNode:(ASPagerNode *)pagerNode

Parameters

pagerNode

The sender.

Return Value

The total number of pages that can display in the pagerNode.

Declared In

ASPagerNode.h

– pagerNode:nodeAtIndex:

This method replaces -collectionView:nodeForItemAtIndexPath:

- (ASCellNode *)pagerNode:(ASPagerNode *)pagerNode nodeAtIndex:(NSInteger)index

Parameters

pagerNode

The sender.

index

The index of the requested node.

Return Value

a node for display at this index. This will be called on the main thread and should not implement reuse (it will be called once per row). Unlike UICollectionView’s version, this method is not called when the row is about to display.

Declared In

ASPagerNode.h

– pagerNode:nodeBlockAtIndex:

This method replaces -collectionView:nodeBlockForItemAtIndexPath: This method takes precedence over pagerNode:nodeAtIndex: if implemented.

- (ASCellNodeBlock)pagerNode:(ASPagerNode *)pagerNode nodeBlockAtIndex:(NSInteger)index

Parameters

pagerNode

The sender.

index

The index of the requested node.

Return Value

a block that creates the node for display at this index. Must be thread-safe (can be called on the main thread or a background queue) and should not implement reuse (it will be called once per row).

Declared In

ASPagerNode.h