我想处理WebView
中的mouseDown
事件。我subclassed WebView
,实施了mouseDown
,我才知道mouseDown
被重定向到WebHTMLView
。如何在WebView中捕获mouseDown事件?
我已经通过以下链接。
mouseDown: not firing in WebView subclass
从上面的链接我知道了,我们可以在mouseDownEvent重定向到的Objective-C,但我没有找到这方面的任何解决方案。我可以使用任何指针或示例JavaScript来实现相同的功能。
我试过webview
子类中的hitTest方法。
- (NSView*)hitTest:(NSPoint)aPoint
是否可以识别上述方法中的mouseDown?
corona zorro:这不是iPhone.Do you have any tips for same same Cocoa? – Ram
Cocoa Touch是一个用于构建软件程序的UI框架,可以从Apple Inc.在iPhone,iPod Touch和iPad上运行。因此,它也可以用于这些应用程序,它只是iPhone的一部分。 –
他要求mac os x。 – vikingosegundo