2

I have a simple implicit UIView animation I'm trying to execute, like this:

[UIView animateWithDuration:2 delay:0 options:0 animations:^{
    [_testView setFrame:endFrame];
} completion:nil];

However, this animation happens instantly, disregarding the duration parameter. I'm performing this in -didMoveToWindow so I know my view is in the window's view hierarchy. I assume it is due to coalesced animations, so I force the animation to occur in the next runloop, like this:

[[NSOperationQueue mainQueue] addOperationWithBlock:^{
    [UIView animateWithDuration:2 delay:0 options:0 animations:^{
        [_testView setFrame:endFrame];
    } completion:nil];
}];

This works fine, but is really ugly and I don't want to have to do it everywhere. My view is nested deep within another custom view hierarchy, so I want to figure out what in this hierarchy is causing the animations to be coalesced.

How do I debug this? I basically want to know what transactions are currently being performed so I can try to un-nest them, if that makes any sense. Or let me know if I'm barking up the wrong tree.

Senior
  • 2,259
  • 1
  • 20
  • 31

0 Answers0