0

问题:带有 UIWebView 的快速 UITableViewCell

  1. 使用UITapGestureRecognizer实现UIWebView点击事件,但是当点击UIWebView中的链接时,会触发UITapGestureRecognizer和Link事件。如何解决?</p>

  2. 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>

4

1 回答 1

0

不建议在 tableview 单元格中使用 webview。这两个类都继承自 scrollview :)

于 2013-05-21T17:56:25.653 回答