Jacob
Jacob

Reputation: 1459

Stop user interaction on view

My code does an animation that flips from right to left. The problem is while its switching, only a .75 second animation, the user is still able to interact with the program. I dont want them to be able to, is there a way to stop all user interaction for a short time, or just a way to stop it completely, then i can just use a timer to put it back on. here is my code for the animation:

        [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.75];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight
                           forView:[self view]
                             cache:YES];
    [UIView commitAnimations];    

Thanks, Jacob

Upvotes: 2

Views: 529

Answers (1)

Nathanial Woolls
Nathanial Woolls

Reputation: 5291

Try:

[self.view setUserInteractionEnabled:NO];

Upvotes: 5

Related Questions