我正在尝试电子书阅读应用。在那里我想通过点击索引页面链接来创建UIActionSheet。为此我如何识别webView中的触摸事件,因为WebView已经有内置的longTouch事件。有没有办法在webView中识别longtouch事件?
答案 0 :(得分:2)
只需覆盖以下方法即可使用我们的游戏
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer
*)otherGestureRecognizer
{
return YES;
}
For adding longPress add to your view
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];
longPress.minimumPressDuration=0.8;
longPress.delegate = self;
[self addGestureRecognizer:longPress];
[longPress release];
- (void)longPress:(UILongPressGestureRecognizer*)gesture
{
}