问题:带有 UIWebView 的快速 UITableViewCell
使用UITapGestureRecognizer实现UIWebView点击事件,但是当点击UIWebView中的链接时,会触发UITapGestureRecognizer和Link事件。如何解决?</p>
cellForRowAtIndexPath 代码:
UITapGestureRecognizer* singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)]; singleTap.numberOfTapsRequired = 1; singleTap.numberOfTouchesRequired = 1; singleTap.view.tag = indexPath.row; singleTap.delegate = self; singleTap.cancelsTouchesInView = NO; [cell.wvContent addGestureRecognizer:singleTap]; // cell.wvContent is UIWebView
点击任意一行会重复触发多次,如何解决?</p>