Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AsyncDisplayKit/ASCollectionView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ - (void)reloadData

- (void)setDataSource:(id<UICollectionViewDataSource>)dataSource
{
ASDisplayNodeAssert(NO, @"ASCollectionView uses asyncDataSource, not UICollectionView's dataSource property.");
// UIKit can internally generate a call to this method upon changing the asyncDataSource; only assert for non-nil.
ASDisplayNodeAssert(dataSource == nil, @"ASCollectionView uses asyncDataSource, not UICollectionView's dataSource property.");
}

- (void)setDelegate:(id<UICollectionViewDelegate>)delegate
Expand Down
3 changes: 2 additions & 1 deletion AsyncDisplayKit/ASTableView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ - (void)dealloc

- (void)setDataSource:(id<UITableViewDataSource>)dataSource
{
ASDisplayNodeAssert(NO, @"ASTableView uses asyncDataSource, not UITableView's dataSource property.");
// UIKit can internally generate a call to this method upon changing the asyncDataSource; only assert for non-nil.
ASDisplayNodeAssert(dataSource == nil, @"ASTableView uses asyncDataSource, not UITableView's dataSource property.");
}

- (void)setDelegate:(id<UITableViewDelegate>)delegate
Expand Down
3 changes: 0 additions & 3 deletions examples/ASTableViewStressTest/Sample/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ - (NSArray *)randomIndexPathsExisting:(BOOL)existing

- (void)thrashTableView
{
_tableView.asyncDelegate = self;
_tableView.asyncDataSource = self;

[_tableView reloadData];

NSArray *indexPathsAddedAndRemoved = nil;
Expand Down