HelmiB HelmiB - 3 months ago 14
Objective-C Question

Can't touch during animation (Block Animation)

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

Answer Source

I ended up not doing this. You can't touch a view that still animating. that's my conclusion. Would be happy to hear some thought on this though.