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

Conversation

@RuiAAPeres
Copy link

As discussed here #724

@RuiAAPeres
Copy link
Author

The cell sizing is working (with a nil delegate) along side with the table:didSelectRowAtIndexPath: (with a non-nil delegate).

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change actually necessary, given that it will be replaced / overwritten below anyway? If it is necessary, could you add a comment that explains why?

@appleguy
Copy link
Contributor

appleguy commented Oct 9, 2015

@RuiAAPeres Thank you for looking at this! I would love to land this but am not yet comfortable as I don't understand the significance of one of the core changes here, moving the = nil outside the conditionals. Once I understand that, and if applicable (e.g. it is subtle reasoning and critical) it is commented, we'll get it in.

@appleguy
Copy link
Contributor

@RuiAAPeres ping - I'm going to branch for the next release soon (looks like we'll call it 1.9 — representing confidence in improvements for all 1.x surface area, but some fluidity remaining for 2.x APIs). This is not /essential/ for the branch, but nice to have.

@RuiAAPeres
Copy link
Author

@appleguy sorry for the delay. About the changes, they allowed me to be able to fix both the cell height's issue (when no delegate is assigned), enable table:didSelectRowAtIndexPath: and make the tests pass. I am unsure how/why setting _asyncDataSource = nil; before assigning it to a proper delegate makes it work, but the reality is that it does (I am suspecting there is a bug in UIKit). On my current project I am using my own branch, and things are working as expected.

I do understand, that you need a more convincing proof, but this week, I don't have time to create a project that:

  1. Is able to reproduce this crash without any of my changes and then with my changes prevent the crash.
  2. With a nil delegate, cells will have the proper size defined (according to calculateSizeThatFits).
  3. With a non-nil delegate, table:didSelectRowAtIndexPath: will work.
  4. The tests pass.

@RuiAAPeres RuiAAPeres closed this Oct 23, 2015
aimalygin pushed a commit to aimalygin/AsyncDisplayKit that referenced this pull request Feb 19, 2018
* [ASCellNode] Adds mapping for UITableViewCell focusStyle

* Update CHANGELOG.md
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