mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Expose collection view supplementary node data source method
This commit is contained in:
committed by
Levi McCallum
parent
0d2332bd82
commit
e492770aed
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user