[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:
Hannah Troisi
2016-10-24 17:14:28 -07:00
committed by Adlai Holler
parent 0d439a43b6
commit 0b7dfcc54d
17 changed files with 275 additions and 288 deletions

View File

@@ -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;
}