当动画UIImageView时,它不会在动画期间发送事件,但是当它完成动画时,那时它能够发送事件,我也尝试了UIButton。
答案 0 :(得分:1)
在调用动画时,您只需要包含UIViewAnimationOptionAllowUserInteraction选项:
[UIView animateWithDuration:animationDuration
delay:0
options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction)
<snip>];
答案 1 :(得分:0)
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
[animation setType:kCATransitionFade];
[animation setDuration:0.0];// try 0.1 also
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:
kCAMediaTimingFunctionEaseInEaseOut]];
[[yourImageView layer] addAnimation:animation forKey:@"transitionViewAnimation"];//Try self.view insted of yourImageView if you want to animate whole view