2
votes

The documentation for UIView animateWithDuration says that during the animation all user interactions are blocked. But I'm wondering if it also blocks during the pre-animation delay.

The documentation says

"During an animation, user interactions are temporarily disabled for the views being animated. (Prior to iOS 5, user interactions are disabled for the entire application.) If you want users to be able to interact with the views, include the UIViewAnimationOptionAllowUserInteraction constant in the options parameter."

But when I give a significant delay (let's say 1 second), it blocks the UI during that second as well. I wouldn't guess that to be the case as the documentation for the delay parameter says:

"The amount of time (measured in seconds) to wait before beginning the animations. Specify a value of 0 to begin the animations immediately."

Key words there are before beginning the animations while the note about blocking user interaction talks about during an animation.

However, my application doesn't update the UI during the pre-animation delay. Does the delay block UI interactions as well or is my UI blocked for another reason?

1

1 Answers

5
votes

I can confirm that the UI is blocked during the delay before animation begins. To be honest, I was surprised.