A custom view I created is being animated by its container - in my view I update portions of the subviews with other animations (for instance a UICOllectionView)
I see that this is throwing errors
*** Assertion failure in -[UICollectionView _endItemAnimations
Digging around I see that my view has animations attached to it:
<GeneratorView: 0x15b45950; frame = (0 0; 320 199); animations = { position=<CABasicAnimation: 0x145540a0>; }; layer = <CALayer: 0x15b49410>>
So now before performing animation operations I check:
NSArray *animationKeys = [self.layer animationKeys];
for (NSString *key in animationKeys) {
CAAnimation *animation = [self.layer animationForKey:key];
}
and I see that animation objects are returned:
at this point I would like to "wait" until all animations have completed before updating self.
I see that I can add myself as the CAAnimation delegate.
But this is a bit messy and hard to track.
Is there an easier way using a UIView method - much higher level?