场景描述:
UIScrollView上添加了一个UIView,在UIView上添加了一个UITableView,然后给UIView添加了一个UITapGestureRecognizer。此时点击UITableViewCell会出现点击的效果,但是不触发点击的方法
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath;
解决办法:
我的解决办法是,去掉UIView上添加的UITapGestureRecognizer手势,在UIView添加一个大的UIButton,使用UIButton的点击事件。
参考:http://blog.csdn.net/u011452278/article/details/51093427