Add collectionNode:nodeBlockForSupplementaryElementOfKind:atIndexPath: (#3078)

* Add optional support for nodeBlockForSupplementaryElementOfKind:

* Update example

* Update harder
This commit is contained in:
Adlai Holler
2017-02-24 18:47:01 -08:00
committed by GitHub
parent 9c82ae9284
commit 2fd487b447
5 changed files with 41 additions and 18 deletions

View File

@@ -480,6 +480,15 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (ASCellNode *)collectionNode:(ASCollectionNode *)collectionNode nodeForItemAtIndexPath:(NSIndexPath *)indexPath;
/**
* Asks the data source to provide a node-block to display for the given supplementary element in the collection view.
*
* @param collectionNode The sender.
* @param kind The kind of supplementary element.
* @param indexPath The index path of the supplementary element.
*/
- (ASCellNodeBlock)collectionNode:(ASCollectionNode *)collectionNode nodeBlockForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
/**
* Asks the data source to provide a node to display for the given supplementary element in the collection view.
*