点击webvIEw时,“tapRecognized”方法不会被调用.
这是我的代码:
UITapGestureRecognizer *oneFingerTwoTaps = [[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapRecognized)] autorelease]; [oneFingerTwoTaps setNumberOfTapsrequired:1];// Add the gesture to the vIEw[[self vIEw] addGestureRecognizer:oneFingerTwoTaps];
我也尝试过使用foll:
[scrollvIEw addGestureRecognizer:oneFingerTwoTaps];[webvIEw addGestureRecognizer:oneFingerTwoTaps];
请帮忙
解决方法 尝试添加以下语句://.h...@interface yourclass <UIGestureRecognizerDelegate>...//.m...[oneFingerTwoTaps setDelegate:self];...- (BOol)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { return YES;}
我希望它可以提供帮助
总结以上是内存溢出为你收集整理的iphone – 点击手势识别器不适用于UIVcrollView内部的UIWebiew,它位于UIView内部全部内容,希望文章能够帮你解决iphone – 点击手势识别器不适用于UIVcrollView内部的UIWebiew,它位于UIView内部所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)