【问题标题】:Hittest for touches ended in UIWebView以 UIWebView 结束的触摸的 Hittest
【发布时间】:2010-01-18 01:09:26
【问题描述】:

当用户触摸我的 UIWebview 时,我正在使用 hittest 来获取信息。我需要知道用户何时停止触摸视图,但我没有从 hittest 获得任何事件。有没有其他功能可以做到这一点?

- (void)hitTest:(CGPoint)point withEvent:(UIEvent *)event
{
    NSLog(@"Event type:%@", event.type);

    if (event.type == UIEventTypeTouches) {
        NSLog(@"Got something");
    }

    // call the super
    [super hitTest:point withEvent:event];
}

【问题讨论】:

  • 没有想法?我的事件类型也总是“nil”。

标签: uiwebview hittest


【解决方案1】:

子类化 UIWebView,并在该类中实现此方法,以便您可以找到触摸。 它会执行你的 if 条件。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多