Relayout table view cell nodes if there is a mismatch between content view size and the node's constrained size

- Above is the generic case. Correctly handling it means relayout when the table view enters or leaves editing mode is solved as well.
- Async data source API removal: In a table view, cell nodes should always fill its content view and table view widths. Thus async data source can no longer provide custom constrained size for cell nodes. This removal allows table view to better handle relayout.
- Some more tests are added to ASTableViewTests to check against use cases handled in this diff.
This commit is contained in:
Huy Nguyen
2015-09-15 22:26:11 +03:00
parent fff8a0be4a
commit 2d575fcafc
3 changed files with 191 additions and 55 deletions

View File

@@ -266,17 +266,6 @@
@optional
/**
* Provides the constrained size range for measuring the node at the index path.
*
* @param tableView The sender.
*
* @param indexPath The index path of the node.
*
* @returns A constrained size range for layout the node at this index path.
*/
- (ASSizeRange)tableView:(ASTableView *)tableView 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