Dmitry Shevchenko
Dmitry Shevchenko

Reputation: 32414

iOS Simulator does not slow down CA animations

If you use [UIView animate...] you can toggle slow animations in simulator. But if you working with layers and CAAnimation — those animation won't slow down. What is the reason?

Upvotes: 4

Views: 735

Answers (1)

followben
followben

Reputation: 9197

Unfortunately, the Simulator can only toggle the speed of UIView animations.

As a workaround, simply set the speed property of the UIWindow or an arbitrary root view:

view.layer.speed = 0.1f; // 10x slower animations

This slows down all CAAnimations within the layer's sub-hierarchy, including UIView animations.

Upvotes: 4

Related Questions