The custom view that I created is animated by its container - in my opinion, I am updating the parts with other animations (for example, UICOllectionView)
I see it throwing errors
*** Assertion failure in -[UICollectionView _endItemAnimations
Digging around, I see that my view is related to animation:
<GeneratorView: 0x15b45950; frame = (0 0; 320 199); animations = { position=<CABasicAnimation: 0x145540a0>; }; layer = <CALayer: 0x15b49410>>
So, before performing the animation operations, I check:
NSArray *animationKeys = [self.layer animationKeys];
for (NSString *key in animationKeys) {
CAAnimation *animation = [self.layer animationForKey:key];
}
and I see that the animation objects are returning:
at this point, I would like to “wait” until all animations complete before the update.
I see that I can add myself as a CAAnimation delegate.
But it's a little dirty and hard to keep track of.
Is there an easier way to use the UIView method - a much higher level?
source
share