Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iphone development: disabling user interaction during the animation

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?

like image 742
death7eater Avatar asked Sep 06 '12 15:09

death7eater


Video Answer


1 Answers

Before animation:

self.view.userInteractionEnabled = NO;

and in animation completion block:

self.view.userInteractionEnabled = YES;
like image 139
swebal Avatar answered Sep 22 '22 15:09

swebal