Alex Rivera | Logout

iphone development: disabling user interaction during the animation

Asked 2012-09-06T15:05:42.167
13

in my app I have some animations. for example I have a button in my main menu and when you click it animation begins (like moving some place etc.) and at the end of the animation it is navigated to an another page. What I need is disabling the user interaction during the animation. because during the animation If I press the starting point of my button, the page which is supposed to be navigated is opened twice. To sum up, If I do not let any kind of user interaction during the animation, my problem will be solved. How can I do that?

Edit
Report

1 Answer

23

Before animation:

self.view.userInteractionEnabled = NO;

and in animation completion block:

self.view.userInteractionEnabled = YES;
answered 2012-09-06T15:08:59.893

Your Answer