<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

        Add a UITapGestureRecognizer to a UIWebView(将 UITapGestureRecognizer 添加到 UIWebView)
          <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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  EAAccessory/EASession teardown during background(EAAccessory/EASession 在后台拆除)
                  Getting an NSArray of a single attribute from an NSArray(从 NSArray 获取单个属性的 NSArray)
                  ImageIO: lt;ERRORgt; JPEG Corrupt JPEG data: premature end of data segment iphone - how to catch this?(ImageIO:lt;错误gt;JPEG 损坏的 JPEG 数据:iphone 数据段过早结束 - 如何捕捉到这个?)
                  How to get indexPath.row of tableView which is currently being displayed?(如何获取当前正在显示的 tableView 的 indexPath.row?)
                  Xcode iOS organizer submit to app store yields quot;The archive is invalidquot; error(Xcode iOS 管理器提交到应用商店产生“存档无效;错误)
                  MFMessageComposeViewController alloc returns nil(MFMessageComposeViewController alloc 返回 nil)
                    <tbody id='gSMjG'></tbody>

                      • <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>