Expose collection view supplementary node data source method

This commit is contained in:
Levi McCallum
2015-09-22 21:08:50 -07:00
committed by Levi McCallum
parent 0d2332bd82
commit e492770aed
2 changed files with 13 additions and 0 deletions

View File

@@ -76,6 +76,17 @@
return node;
}
- (ASDisplayNode *)collectionView:(ASCollectionView *)collectionView nodeForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
ASDisplayNode *node = [[ASDisplayNode alloc] init];
if ([kind isEqualToString:UICollectionElementKindSectionHeader]) {
node.backgroundColor = [UIColor blueColor];
} else {
node.backgroundColor = [UIColor redColor];
}
return node;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return 300;