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

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

Merged
appleguy merged 2 commits intofacebookarchive:masterfrom
nguyenhuy:relayout_editing_mode
Sep 16, 2015
Merged

Relayout table view cell nodes if there is a mismatch between content view size and the node's constrained size#655
appleguy merged 2 commits intofacebookarchive:masterfrom
nguyenhuy:relayout_editing_mode

Conversation

@nguyenhuy
Copy link
Copy Markdown
Contributor

  • Above is the generic case. Correctly handling it means relayout when the table view enters or leaves editing mode is taken care of 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.

@nguyenhuy
Copy link
Copy Markdown
Contributor Author

With this, I'm confident that #512 is finally solved.

… 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.
@nguyenhuy nguyenhuy force-pushed the relayout_editing_mode branch from 39f4e3d to 2d575fc Compare September 16, 2015 08:41
Comment thread AsyncDisplayKit/ASTableView.mm Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, should we actually be calling didTransitionToState: before the layout has been completed? Maybe we should add a call to -layoutIfNeeded here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

…other state

Relayout will be triggered in layoutSubviews (if needed).
@nguyenhuy nguyenhuy force-pushed the relayout_editing_mode branch from 0b9981e to 094d257 Compare September 16, 2015 12:25
appleguy added a commit that referenced this pull request Sep 16, 2015
Relayout table view cell nodes if there is a mismatch between content view size and the node's constrained size
@appleguy appleguy merged commit b557075 into facebookarchive:master Sep 16, 2015
peter-iakovlev pushed a commit to peter-iakovlev/AsyncDisplayKit that referenced this pull request Jan 9, 2018
Fix `ASBackgroundLayoutSpec ` example code bug
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants