mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-29 11:25:38 +00:00
Add ASCellNode type assertions (closes #161).
This commit is contained in:
parent
b653f75794
commit
e754cc2024
@ -314,7 +314,9 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
|
||||
- (ASCellNode *)dataController:(ASDataController *)dataController nodeAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
return [_asyncDataSource collectionView:self nodeForItemAtIndexPath:indexPath];
|
||||
ASCellNode *node = [_asyncDataSource collectionView:self nodeForItemAtIndexPath:indexPath];
|
||||
ASDisplayNodeAssert([node isKindOfClass:ASCellNode.class], @"invalid node class, expected ASCellNode");
|
||||
return node;
|
||||
}
|
||||
|
||||
- (CGSize)dataController:(ASDataController *)dataController constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath
|
||||
|
||||
@ -397,7 +397,9 @@ static BOOL _isInterceptedSelector(SEL sel)
|
||||
#pragma mark - ASDataControllerDelegate
|
||||
|
||||
- (ASCellNode *)dataController:(ASDataController *)dataController nodeAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return [_asyncDataSource tableView:self nodeForRowAtIndexPath:indexPath];
|
||||
ASCellNode *node = [_asyncDataSource tableView:self nodeForRowAtIndexPath:indexPath];
|
||||
ASDisplayNodeAssert([node isKindOfClass:ASCellNode.class], @"invalid node class, expected ASCellNode");
|
||||
return node;
|
||||
}
|
||||
|
||||
- (CGSize)dataController:(ASDataController *)dataController constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user