-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Create and set delegate for clip corner layers within ASDisplayNode #1029
Conversation
2adc7a8
to
8eeb5ba
Compare
🚫 CI failed with log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
@maicki Did you run the test suite locally? |
@nguyenhuy Yeah but I would rather wait for the CI to pass tbh |
👍 |
|
||
- (id<CAAction>)actionForLayer:(CALayer *)layer forKey:(NSString *)event | ||
{ | ||
return nil; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should we return
(id)kCFNull
to prevent the default action, like we do for other layers? That suppresses the default action (e.g. fade in). - Is this different than setting no delegate on the layers?
- Let's share one single instance of this rather than creating one for each layer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Yes this should return
(id)kCFNull
I will change that. - Yes setting no delegate should animate the layer
- We are already sharing one instance if you look where we create the shared delegate for all of the corner layers within the code
🚫 CI failed with log |
🚫 CI failed with log |
fca8083
to
5c2a135
Compare
🚫 CI failed with log |
🚫 CI failed with log |
5c2a135
to
d66a4af
Compare
…extureGroup#1029) * Create and use ASDisplayNodeCornerLayerDelegate * Return kCFNull for actionForLayer:forKey:
Currently the delegate for all rounded corner layers are set to the owning display node. This has the effect that
actionForLayer:forKey:
is called on the node for every corner layer although it should have their own delegate. InactionForLayer:forKey:
we assert that the node is layer backed. This is not necessary needed if using corner rounding though.This diff will create an
ASDisplayNodeCornerLayerDelegate
and set it as delegate for the corner layers.Fixes #1020, #910