This repository was archived by the owner on Feb 2, 2023. It is now read-only.
Add UIResponder methods to ASDisplayNode #521
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Note: this is the same PR as #513, which I've closed - I wanted to issue this PR from a different fork, and don't know of a more elegant way to do it).
@appleguy: thanks for the review. I'm not 100% sure of things here, since I'm not insanely experienced working with the responder chain, but here are my thoughts so far regarding your questions:
UIViewhierarchies. To be more explicit about this, I now check if a node islayerBackedwhen callingbecomeFirstResponder/resignFirstResponderand immediately returnNOif so.ASTextNodesubclass in order to show aUIMenuControllerand copy its contents. I'm currently doing this is in the app I'm working on (pointing at my branch of ASDK) and it's working well. Also, not sure if this really counts as a use case, but I've also updatedASEditableTextNodeto implement these methods properly and it feels sane to me.layerBackedbehavior works as intended.Ultimately, given that the changes here require opting-in via subclassing anyway, I'm in favor of merging early and waiting to see if anyone actually encounters any performance issues in practice, but I'm obviously a bit biased : )