Last active May 9, 2018

Persists (pauses) layer animations (including UIView animation generated animations) when the application enters into background and restores (resumes) animations from where they left off upon returning from background.

This comment has been minimized.

This comment has been minimized.

@matej I think I found a bug. Competition block is not being called after the resumed ends, but if fires as soon as the app has resumed, not taking care of the real time left. Any idea if this could be solved? Could we know how much time left the animation has before going BG and at resume time we fire completion block with this saved duration? Thanks!

This comment has been minimized.

The completion block should be called when you enter background (which cancels the animation). At least that's what I remember seeing. It's not a problem for me as I don't use the completion block and have an infinitely repeating animation (UIViewAnimationOptionAutoreverse | UIViewAnimationOptionRepeat).

This comment has been minimized.

OK, I added '#import <UIKit/UIKit.h>' to your.h file and that solved the problem. However, I'm facing a similar problem to imton. The time the app is in the background creates a delay of that length when I trigger the animation again.