mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Fix cell selection and highlighting in ASCollectionView
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
#import <AsyncDisplayKit/AsyncDisplayKit.h>
|
||||
#import "SupplementaryNode.h"
|
||||
#import "ItemNode.h"
|
||||
|
||||
@interface ViewController () <ASCollectionViewDataSource, ASCollectionViewDelegateFlowLayout>
|
||||
{
|
||||
@@ -78,11 +79,7 @@
|
||||
- (ASCellNode *)collectionView:(ASCollectionView *)collectionView nodeForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
NSString *text = [NSString stringWithFormat:@"[%zd.%zd] says hi", indexPath.section, indexPath.item];
|
||||
ASTextCellNode *node = [[ASTextCellNode alloc] init];
|
||||
node.text = text;
|
||||
node.backgroundColor = [UIColor lightGrayColor];
|
||||
|
||||
return node;
|
||||
return [[ItemNode alloc] initWithString:text];
|
||||
}
|
||||
|
||||
- (ASCellNode *)collectionView:(ASCollectionView *)collectionView nodeForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
|
||||
|
||||
Reference in New Issue
Block a user