After some more poking around, it seems that the UIDynamicAnimatorDelegate
does this - the - (void)dynamicAnimatorDidPause:(UIDynamicAnimator *)animator
method seems to be called when the system is at a rest state.
self.animator = [[UIDynamicAnimator alloc] initWithReferenceView:self];
self.animator.delegate = self;
and
#pragma mark - UIDynamicAnimator Delegate
- (void)dynamicAnimatorDidPause:(UIDynamicAnimator *)animator
{
NSLog(@"pause");
}
- (void)dynamicAnimatorWillResume:(UIDynamicAnimator *)animator
{
NSLog(@"resume");
}
seem to work - resume
is logged when the animation starts, and pause
is logged within a second of the animation stopped.
Additionally, the running
property on the UIDynamicAnimator itself seems to mirror the calls to the delegate methods - it's 1
when willResume is called, and it's 0
when didPause is called.