ASPagerNode Class Reference
Inherits from | ASCollectionNode : ASDisplayNode : ASDealloc2MainObject |
---|---|
Declared in | ASPagerNode.h |
– init
Configures a default horizontal, paging flow layout with 0 inter-item spacing.
- (instancetype)init
Declared In
ASPagerNode.h
– initWithCollectionViewLayout:
Initializer with custom-configured flow layout properties.
- (instancetype)initWithCollectionViewLayout:(ASPagerFlowLayout *)flowLayout
Declared In
ASPagerNode.h
– setDataSource:
Data Source is required, and uses a different protocol from ASCollectionNode.
- (void)setDataSource:(nullable id<ASPagerDataSource>)dataSource
Declared In
ASPagerNode.h
– dataSource
The object that acts as the asynchronous data source of the collection view
- (nullable id<ASPagerDataSource>)dataSource
Discussion
The datasource must adopt the ASCollectionDataSource protocol. The collection view maintains a weak reference to the datasource object.
The datasource object is responsible for providing nodes or node creation blocks to the collection view.
Note: This is a convenience method which sets the asyncDatasource on the collection node’s collection view.
Declared In
ASCollectionNode.h
– setDelegate:
Delegate is optional. This includes UIScrollViewDelegate as well as most methods from UICollectionViewDelegate, like willDisplay…
- (void)setDelegate:(nullable id<ASPagerDelegate>)delegate
Declared In
ASPagerNode.h
– delegate
The object that acts as the asynchronous delegate of the collection view
- (nullable id<ASPagerDelegate>)delegate
Discussion
The delegate must adopt the ASCollectionDelegate protocol. The collection view maintains a weak reference to the delegate object.
The delegate object is responsible for providing size constraints for nodes and indicating whether batch fetching should begin.
Note: This is a convenience method which sets the asyncDelegate on the collection node’s collection view.
Declared In
ASCollectionNode.h
view
The underlying ASCollectionView object.
@property (nonatomic, readonly) ASCollectionView *view
Declared In
ASPagerNode.h
currentPageIndex
Returns the current page index
@property (nonatomic, assign, readonly) NSInteger currentPageIndex
Declared In
ASPagerNode.h
– scrollToPageAtIndex:animated:
Scroll the contents of the receiver to ensure that the page is visible
- (void)scrollToPageAtIndex:(NSInteger)index animated:(BOOL)animated
Declared In
ASPagerNode.h
– nodeForPageAtIndex:
Returns the node for the passed page index
- (ASCellNode *)nodeForPageAtIndex:(NSInteger)index
Declared In
ASPagerNode.h