diff --git a/Guides/Getting Started.md b/Guides/Getting Started.md index 40fd2319b..f8fc1757a 100644 --- a/Guides/Getting Started.md +++ b/Guides/Getting Started.md @@ -62,6 +62,12 @@ func emptyView(for listAdapter: ListAdapter) -> UIView? { } ``` +After you have created the data source you need to connect it to the `IGListAdapter` by setting its `dataSource` property: + +```swift +adapter.dataSource = self +``` + You can return an array of _any_ type of data, as long as it conforms to `IGListDiffable`. ### Immutability diff --git a/Source/IGListAdapter.m b/Source/IGListAdapter.m index d1a86dc40..3d4a50505 100644 --- a/Source/IGListAdapter.m +++ b/Source/IGListAdapter.m @@ -282,7 +282,7 @@ - (void)performUpdatesAnimated:(BOOL)animated completion:(IGListUpdaterCompletio id dataSource = self.dataSource; UICollectionView *collectionView = self.collectionView; if (dataSource == nil || collectionView == nil) { - IGLKLog(@"Warning: Your call to performUpdatesAnimated-method is ignored as dataSource or collectionView haven't been set."); + IGLKLog(@"Warning: Your call to %s is ignored as dataSource or collectionView haven't been set.", __PRETTY_FUNCTION__); if (completion) { completion(NO); } @@ -319,7 +319,7 @@ - (void)reloadDataWithCompletion:(nullable IGListUpdaterCompletion)completion { id dataSource = self.dataSource; UICollectionView *collectionView = self.collectionView; if (dataSource == nil || collectionView == nil) { - IGLKLog(@"Warning: Your call to reloadDataWithCompletion-method is ignored as dataSource or collectionView haven't been set."); + IGLKLog(@"Warning: Your call to %s is ignored as dataSource or collectionView haven't been set.", __PRETTY_FUNCTION__); if (completion) { completion(NO); }