3
A
回答
0
在动画过程中,无论此属性中的值如何,都会暂时禁用动画中涉及的所有视图的用户交互。您可以通过在配置动画时指定UIViewAnimationOptionAllowUserInteraction选项来禁用此行为。
此外,您还可以在上海华实现
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
捕捉事件,看看是否该事件被指向按钮。
6
您是否尝试了AllowUserInteraction选项?
[UIView animateWithDuration:5.0
delay:0.0
options:UIViewAnimationOptionAllowUserInteraction
animations:^{ // move the button }
completion:^(BOOL finished){}];
0
由于UIButton
继承UIControl
它继承UIView
,我相信你正在使用的基于块的方法来动画的按钮animateWithDuration:delay:options:animations:completion:
您需要添加选项UIViewAnimationOptionAllowUserInteraction
当你动画的UIButton的允许识别一些用户交互。正如你试验的,用户交互在动画期间默认是禁用的,否则。
相关问题
- 1. UIButton触摸事件
- 2. 识别触发触摸事件
- 3. 如何识别其他触摸事件中的按钮触摸事件
- 4. UIButton触摸事件重叠
- 5. 在iPhone的触摸动画UIButton交换?
- 6. 识别iPhone中的触摸事件
- 7. 如何在触摸事件上画线?
- 8. 当一个UIButton的动画我想在按钮识别事件
- 9. CorePlot触摸识别滚动
- 10. 如何在使用目标c代码在ios中进行动画时识别UIImageView上的触摸事件?
- 11. 触摸UIButton触摸
- 12. 如何处理UIButton上的触摸事件和手势事件?
- 13. 与触摸识别
- 14. 如何在触摸UIButton时通过UIView检测触摸?
- 15. 动画不适用于触摸事件?
- 16. 动画UISlider上触摸完成事件
- 17. UIView动画防止触摸事件?
- 18. 识别移动对象中的触摸事件
- 19. 滚动型手势识别吃所有触摸事件,
- 20. 取消触摸它时的UIButton触摸
- 21. UIButton没有收到触摸事件
- 22. 事件触摸结束了一个UIButton
- 23. UIButton触摸事件 - 斯威夫特
- 24. UIScrollView和UIButton触摸侧事件冲突
- 25. 如何通过触摸事件在画布上移动图像?
- 26. 识别仅在发生触摸时创建的UIView的触摸
- 27. 如何识别哪个imageView被触摸?
- 28. UIButton移动和触摸
- 29. 触摸移动时取消触摸UIButton(iOS)
- 30. 如何让动画在触摸时开始并再次触摸时停止?
[UIButton无法在使用UIView animateWithDuration动画时触及](http://stackoverflow.com/questions/8346100/uibutton-cant-be-touched-while-animated-with-uiview-animatewithduration) – leekaiinthesky