mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASTableView / ASCollectionView] Improve assertion messages if necessary data source methods are not implemented (#2269)
* Improve assertion message if tableView:nodeBlockForRowAtIndexPath: or tableView:nodeForRowAtIndexPath: is not implemented * Improve assertion message if collectionView:nodeForItemAtIndexPath: or collectionView:nodeBlockForItemAtIndexPath: is not implemented
This commit is contained in:
committed by
GitHub
parent
8427083ddb
commit
9f1a387ba0
@@ -306,8 +306,8 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell";
|
||||
_asyncDataSourceFlags.asyncDataSourceTableViewCanMoveRowAtIndexPath = [_asyncDataSource respondsToSelector:@selector(tableView:canMoveRowAtIndexPath:)];
|
||||
_asyncDataSourceFlags.asyncDataSourceTableViewMoveRowAtIndexPath = [_asyncDataSource respondsToSelector:@selector(tableView:moveRowAtIndexPath:toIndexPath:)];
|
||||
|
||||
// Data source must implement tableView:nodeBlockForRowAtIndexPath: or tableView:nodeForRowAtIndexPath:
|
||||
ASDisplayNodeAssertTrue(_asyncDataSourceFlags.asyncDataSourceTableViewNodeBlockForRowAtIndexPath || _asyncDataSourceFlags.asyncDataSourceTableViewNodeForRowAtIndexPath);
|
||||
ASDisplayNodeAssert(_asyncDataSourceFlags.asyncDataSourceTableViewNodeBlockForRowAtIndexPath
|
||||
|| _asyncDataSourceFlags.asyncDataSourceTableViewNodeForRowAtIndexPath, @"Data source must implement tableView:nodeBlockForRowAtIndexPath: or tableView:nodeForRowAtIndexPath:");
|
||||
}
|
||||
|
||||
super.dataSource = (id<UITableViewDataSource>)_proxyDataSource;
|
||||
|
||||
Reference in New Issue
Block a user