[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

@@ -53,12 +53,12 @@
#pragma mark - <ASCollectionDataSource, ASCollectionDelegate>
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
- (NSInteger)collectionNode:(ASCollectionNode *)collectionNode numberOfItemsInSection:(NSInteger)section
{
return 100;
}
- (ASCellNodeBlock)collectionView:(ASCollectionView *)collectionView nodeBlockForItemAtIndexPath:(NSIndexPath *)indexPath
- (ASCellNodeBlock)collectionNode:(ASCollectionNode *)collectionNode nodeBlockForItemAtIndexPath:(NSIndexPath *)indexPath
{
return ^{
ASTextCellNode *cellNode = [ASTextCellNode new];
@@ -68,7 +68,7 @@
};
}
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath
- (ASSizeRange)collectionNode:(ASCollectionNode *)collectionNode constrainedSizeForItemAtIndexPath:(NSIndexPath *)indexPath
{
return ASSizeRangeMake(CGSizeMake(100, 100));
}

View File

@@ -51,12 +51,12 @@
#pragma mark - <ASCollectionDataSource, ASCollectionDelegate>
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- (NSInteger)tableNode:(ASTableNode *)tableNode numberOfRowsInSection:(NSInteger)section
{
return 100;
}
- (ASCellNodeBlock)tableView:(ASTableView *)tableView nodeBlockForRowAtIndexPath:(NSIndexPath *)indexPath
- (ASCellNodeBlock)tableNode:(ASTableNode *)tableNode nodeBlockForRowAtIndexPath:(NSIndexPath *)indexPath
{
return ^{
ASTextCellNode *cellNode = [ASTextCellNode new];