Closed simoami closed 8 years ago
It looks like you have some code that is setting the frame
property while the animation is running. It might be worth checking the backtrace for the assertion failure to find that code, then disabling setting the frame while the animation is running.
@grp I found this:
[accessiblityElement setAccessibilityFrame:UIAccessibilityConvertFrameToScreenCoordinates(subnode.frame, self)];
which then calls:
- (CGRect)frame
{
_bridge_prologue_read;
// Frame is only defined when transform is identity.
#if DEBUG
// Checking if the transform is identity is expensive, so disable when unnecessary. We have assertions on in Release, so DEBUG is the only way I know of.
ASDisplayNodeAssert(CATransform3DIsIdentity(self.transform), @"-[ASDisplayNode frame] - self.transform must be identity in order to use the frame property. (From Apple's UIView documentation: If the transform property is not the identity transform, the value of this property is undefined and therefore should be ignored.)");
#endif
...
}
Ah, the issue is in reading the frame. Hmm. That makes things tougher, since it's hard to control that, especially from a UIKit callback.
I'd suggest filing an issue with AsyncDisplayKit to avoid using the frame
property there. A short term fix could look something like this:
[accessiblityElement setAccessibilityFrame:UIAccessibilityConvertFrameToScreenCoordinates(subnode.layer.frame, self)];
That bypasses the AsyncDisplayKit transform check, at the cost of potentially reading subnode.layer.frame
when it's technically undefined. A more complete solution would compute the frame manually using the layer's bounds
, transform
, position
, and anchorPoint
.
@grp yeah, I see that they fixed the issue in master, the way you suggested:
See my comment here: https://github.com/facebook/AsyncDisplayKit/issues/2233#issuecomment-246557804
Great! Glad it's figured out.
Thanks!
Hello, I'm applying a
POPSpringAnimation(propertyNamed: kPOPViewScaleXY)
to an ASButtonNode (an AsyncDisplayKit UIButton wrapper). The effect is applied on button touch up. If the effect is applied sequentially in a few seconds intervals, the effect works great each time. But if an effect is applied while the previous one is still in progress, though fast multi taps, I hit the following error:My code is as follows: