I have a View with UIButton
, UITextField
, and a UIImageView
for Background.
in viewDidLoad
i try animate UIImageView
from alpha=0 to alpha =1 using block. it's pretty basic, here's the code:
[UIView animateWithDuration:1.5 animations:^(void){
((UIView*)[self.view viewWithTag:123]).alpha = 1;
}completion:^(BOOL finished){
}];
which is working fine. but during that 1.5 seconds of animation, my touch in current view seems to be disabled. i can't click any of the buttons or textFields until animation finish.
Thanks in Advance
You should use option UIViewAnimationOptionAllowUserInteraction as in the following example:
[UIView animateWithDuration:1.0
delay:0
options:UIViewAnimationOptionAllowUserInteraction
animations:^{ myView.alpha = 0.5; }
completion:NULL];
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