我是iPhone开发人员的新手,
我想在我的网络视图中检测到触摸,所以我尝试了这个方法,但是这个方法不会被解雇,
在.h文件中
@interface EpubReaderViewController : UIViewController在.m文件中
...
- (void)sendEvent:(UIEvent *)event{
NSLog(@"Touch detected") ;
}
...即使我也试过这个,
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
NSLog(@"Touches began");
},提前谢谢!
发布于 2012-06-29 06:19:05
用户将放大和缩小网站,以及触摸点击hpyerlink等。‘害羞的触摸方法不会响应UIWebView。
如果要启用触摸,则可能需要在开发人员文档中禁止使用UIWebview子类,请检查以下线程以进行更多讨论-
Handling touches inside UIWebview
https://stackoverflow.com/questions/2122745/how-to-detect-touch-event-in-uiwebview
How to intercept touches events on a MKMapView or UIWebView objects?
Handling touches inside UIWebview
你也可以通过这个教程-
http://mithin.in/2009/08/26/detecting-taps-and-events-on-uiwebview-the-right-way
https://stackoverflow.com/questions/11256873
复制相似问题