Table and collection views' async data source can provide different constrained size per node. And because the size is of type ASSizeRange, it has a min size that is very helpful in many cases..

This commit is contained in:
Huy Nguyen
2015-08-05 16:16:01 +03:00
parent 356ea9dc7f
commit a3c2dbf8cd
6 changed files with 70 additions and 19 deletions

View File

@@ -261,6 +261,17 @@
@optional
/**
* Provides the constrained size range for measuring the node at the index path.
*
* @param collectionView The sender.
*
* @param indexPath The index path of the node.
*
* @returns A constrained size range for layout the node at this index path.
*/
- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath;
/**
* Indicator to lock the data source for data fetching in async mode.
* We should not update the data source until the data source has been unlocked. Otherwise, it will incur data inconsistence or exception