查看原文:http://www.heyuan110.com/archives/389
添加了UITapGestureRecognizer事件的View再添加UITableView导致 didSelectRowAtIndexPath失效
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
给uiview添加了tap手势后tableview的点击事件居然没响应了,找半天找到下面的解决办法,添加tap手势的delegate 再重写下面的方法
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { if(touch.view != scrollview){ return NO; }else return YES; }