mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
[Examples] 2.0 Collection/Table API updates (#2390)
* update VerticalWithinHorizontal example * update SocialAppLayout * update Kittens * update HorizontalWithinVerticalScrolling * update AsyncDisplayKitOverview * update CustomCollectionView * CatDealsCollectionView * update Swift * address @appleguy's comment * updates for tableNode deselectRowAtIndexPath
This commit is contained in:
committed by
Adlai Holler
parent
0d439a43b6
commit
0b7dfcc54d
@@ -34,13 +34,13 @@
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
if (!(self = [super initWithNode:_tableNode]))
|
||||
return nil;
|
||||
|
||||
_tableNode = [[ASTableNode alloc] initWithStyle:UITableViewStylePlain];
|
||||
_tableNode.dataSource = self;
|
||||
_tableNode.delegate = self;
|
||||
|
||||
|
||||
if (!(self = [super initWithNode:_tableNode]))
|
||||
return nil;
|
||||
|
||||
self.title = @"Horizontal Scrolling Gradients";
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRedo
|
||||
target:self
|
||||
@@ -61,14 +61,14 @@
|
||||
[_tableNode reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - ASTableView.
|
||||
#pragma mark - ASTableNode
|
||||
|
||||
- (ASCellNode *)tableView:(ASTableView *)tableView nodeForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
- (ASCellNode *)tableNode:(ASTableNode *)tableNode nodeForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return [[HorizontalScrollCellNode alloc] initWithElementSize:CGSizeMake(100, 100)];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
- (NSInteger)tableNode:(ASTableNode *)tableNode numberOfRowsInSection:(NSInteger)section
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user