Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore call pattern where UIView methods drive __enterHierarchy and __exitHierarchy for view-backed nodes #1561

Merged

Conversation

nguyenhuy
Copy link
Member

After #1396, some view-backed nodes in our app stop responding to tap events. I tracked this issue down to this change which suggests that the order of execution matters.

This diff attempts to fix the issue by restoring the previous call order where __enterHierarchy and __exitHierarchy are driven by _ASDisplayView's -willMoveToWindow: and -didMoveToWindow if the node is view-backed. Layer-backed nodes will still call __enterHierarchy/__exitHierarchy when they get kCAOnOrderIn/kCAOnOrderOut.

This maintains the layer-action support introduced in #1396.

…__exitHierarchy for view-backed nodes

After TextureGroup#1396, some view-backed nodes in our app stop responding to tap events. I tracked it down to [this change](https://github.com/TextureGroup/Texture/pull/1396/files#diff-7fbc7d84a259cbfbee7546a5310dddcfR162) which suggests that the order of execution matters.

This diff attempts to fix the issue by restoring the previous call order where `__enterHierarchy` and `__exitHierarchy` are driven by `_ASDisplayView`'s `-willMoveToWindow:` and `-didMoveToWindow` if the node is view-backed. Layer-backed nodes will still call `__enterHierarchy`/`__exitHierarchy` when they get `kCAOnOrderIn`/`kCAOnOrderOut`.

This maintains the layer-action support introduced in TextureGroup#1396.
Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

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

I should have been the one to do this since I changed it. Thanks for covering me Huy.

@Adlai-Holler Adlai-Holler merged commit ba1e0ac into TextureGroup:master Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants