<i id='H7qsp'><tr id='H7qsp'><dt id='H7qsp'><q id='H7qsp'><span id='H7qsp'><b id='H7qsp'><form id='H7qsp'><ins id='H7qsp'></ins><ul id='H7qsp'></ul><sub id='H7qsp'></sub></form><legend id='H7qsp'></legend><bdo id='H7qsp'><pre id='H7qsp'><center id='H7qsp'></center></pre></bdo></b><th id='H7qsp'></th></span></q></dt></tr></i><div id='H7qsp'><tfoot id='H7qsp'></tfoot><dl id='H7qsp'><fieldset id='H7qsp'></fieldset></dl></div>

    1. <small id='H7qsp'></small><noframes id='H7qsp'>

        <legend id='H7qsp'><style id='H7qsp'><dir id='H7qsp'><q id='H7qsp'></q></dir></style></legend>
          <bdo id='H7qsp'></bdo><ul id='H7qsp'></ul>
      1. <tfoot id='H7qsp'></tfoot>

        将 UITapGestureRecognizer 添加到 UIWebView

        时间:2023-10-22
          <tbody id='nrh2r'></tbody>
          <bdo id='nrh2r'></bdo><ul id='nrh2r'></ul>
          <legend id='nrh2r'><style id='nrh2r'><dir id='nrh2r'><q id='nrh2r'></q></dir></style></legend>

            • <i id='nrh2r'><tr id='nrh2r'><dt id='nrh2r'><q id='nrh2r'><span id='nrh2r'><b id='nrh2r'><form id='nrh2r'><ins id='nrh2r'></ins><ul id='nrh2r'></ul><sub id='nrh2r'></sub></form><legend id='nrh2r'></legend><bdo id='nrh2r'><pre id='nrh2r'><center id='nrh2r'></center></pre></bdo></b><th id='nrh2r'></th></span></q></dt></tr></i><div id='nrh2r'><tfoot id='nrh2r'></tfoot><dl id='nrh2r'><fieldset id='nrh2r'></fieldset></dl></div>

                <small id='nrh2r'></small><noframes id='nrh2r'>

                  <tfoot id='nrh2r'></tfoot>
                • 本文介绍了将 UITapGestureRecognizer 添加到 UIWebView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 iOS 中,是否可以在 UIWebView 上放置一个点击识别器,以便当有人单击 Web 视图时执行一个操作?

                  In iOS, is it possible to put a tap recognizer on a UIWebView, so that when someone single-taps the web view, an action gets performed?

                  当我点击我的 webView 时,下面的代码似乎不会触发 handleTap.

                  Code below doesn't seem fire handleTap when I tap my webView.

                  谢谢.

                  UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self 
                                                                                        action:@selector(handleTap)];
                  tap.numberOfTapsRequired = 1;
                  
                  [webView addGestureRecognizer:tap];
                  [tap release]; 
                  
                  
                  -(void) handleTap {
                      NSLog(@"tap");
                  }
                  

                  推荐答案

                  我发现我必须实现这个方法才能让它工作:

                  I found that I had to implement this method to get it to work:

                  - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
                  {
                      return YES;
                  }
                  

                  这篇关于将 UITapGestureRecognizer 添加到 UIWebView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:UIWebView 中的 iPhone 键盘不会消失 下一篇:如何检测 UIWebView 何时完全完成加载?

                  相关文章

                  1. <small id='gSMjG'></small><noframes id='gSMjG'>

                      <legend id='gSMjG'><style id='gSMjG'><dir id='gSMjG'><q id='gSMjG'></q></dir></style></legend><tfoot id='gSMjG'></tfoot>
                      <i id='gSMjG'><tr id='gSMjG'><dt id='gSMjG'><q id='gSMjG'><span id='gSMjG'><b id='gSMjG'><form id='gSMjG'><ins id='gSMjG'></ins><ul id='gSMjG'></ul><sub id='gSMjG'></sub></form><legend id='gSMjG'></legend><bdo id='gSMjG'><pre id='gSMjG'><center id='gSMjG'></center></pre></bdo></b><th id='gSMjG'></th></span></q></dt></tr></i><div id='gSMjG'><tfoot id='gSMjG'></tfoot><dl id='gSMjG'><fieldset id='gSMjG'></fieldset></dl></div>
                        <bdo id='gSMjG'></bdo><ul id='gSMjG'></ul>