带Gesture的UIView上的UIButton如何响应Action
摘要:
如果你的UIView加上了Tap Gesture,同时这个UIView放上一个UIButton那么当你点击这个UIButton的时候,调用的是Gesture的Action,那么如何解决这个问题呢?很简单,就是判断如果Gesture是点击到按钮上的,那么就不响应,那么这时候直接就进入了UIButton的Action.- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { // Disallow recognition of tap gest.. 阅读全文
posted @ 2012-11-12 22:29 小浪鼓 阅读(1097) 评论(0) 推荐(0) 编辑