Exposing supplementaryNodeOfKind:atIndexPath: in the ASCollectionView interface.

This commit is contained in:
Colin McArdell and Robin Chou
2016-06-20 18:24:07 -04:00
parent db04f4b851
commit d69dd880a5
2 changed files with 7 additions and 0 deletions

View File

@@ -282,6 +282,8 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (ASCellNode *)nodeForItemAtIndexPath:(NSIndexPath *)indexPath;
- (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
/**
* Similar to -indexPathForCell:.
*

View File

@@ -444,6 +444,11 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell";
return [_dataController nodeAtIndexPath:indexPath];
}
- (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
return [_dataController supplementaryNodeOfKind:kind atIndexPath:indexPath];
}
- (NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode
{
return [_dataController indexPathForNode:cellNode];