Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

[ASTableView] Add Optional constrainedSizeForRowAtIndexPath: Data Source Method #1242

Closed
Adlai-Holler opened this issue Feb 18, 2016 · 3 comments

Comments

@Adlai-Holler
Copy link
Contributor

This would correspond to the ASCollectionDataSource method

- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath;

The widths in the returned size range would be ignored. This would make it easy for the data source to specify min/max row heights.

  • Add the optional selector to the ASTableDataSource protocol with documentation.
  • Add a test that the returned size is enforced.
  • Add a flag for whether the data source responds to the selector.
  • In -[ASTableView dataController:constrainedSizeForNodeAtIndexPath:], check that flag and consult the data source if possible otherwise use the current unconstrained values.

I can tackle this in the next couple days but if someone else has bandwidth go for it!

@levi
Copy link
Contributor

levi commented Feb 18, 2016

We also need this for collection views if we are going to have the cells self-size before the layout accesses them.

@appleguy appleguy added this to the 2.0 milestone Mar 1, 2016
@appleguy
Copy link
Contributor

appleguy commented Mar 1, 2016

@levi it does exist for collection today, right? just checking.

@Adlai-Holler thanks for filing this. @nguyenhuy confirmed it would be easy to add after his recent refactor, so we should try to do this in the next month before 2.0GM.

@appleguy
Copy link
Contributor

PR #1769 closes this issue.

aimalygin pushed a commit to aimalygin/AsyncDisplayKit that referenced this issue Nov 24, 2018
…hive#1242)

* Add way to compile out ASTextNode + TextKit dependencies

* Compile out ASExperimentalTextNode and fix tests
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants