For some reason my UIButton won't respond to UIControlEvents while animating. Here's how I animate:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:[duration intValue]];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
// change parent UIView's frame
[UIView commitAnimations];
When it reaches the end, it will let me tap it... but not while it's animating. I am using UIControlEventTouchUpInside, by the way.
Thanks.
You should set the UIViewAnimationOptionAllowUserInteraction
animation option
easier done with block animations:
[UIView animateWithDuration:[duration intValue] options:UIViewAnimationOptionAllowUserInteraction animations^{
//set parent UIView's frame
}];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With