• <small id='7iT7P'></small><noframes id='7iT7P'>

      <bdo id='7iT7P'></bdo><ul id='7iT7P'></ul>

      <legend id='7iT7P'><style id='7iT7P'><dir id='7iT7P'><q id='7iT7P'></q></dir></style></legend>

      1. <tfoot id='7iT7P'></tfoot>

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

        为 UIImageView 修饰内部

        Touch Up Inside for a UIImageView(为 UIImageView 修饰内部)

          <bdo id='bCUJ5'></bdo><ul id='bCUJ5'></ul>

        • <small id='bCUJ5'></small><noframes id='bCUJ5'>

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

          <legend id='bCUJ5'><style id='bCUJ5'><dir id='bCUJ5'><q id='bCUJ5'></q></dir></style></legend>

                  <tbody id='bCUJ5'></tbody>
              • <tfoot id='bCUJ5'></tfoot>
                1. 本文介绍了为 UIImageView 修饰内部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试实现类似于 Touch Up InsideUIButton 的触摸事件.我见过一些使用 touchesBegan:withEvent 的代码,但看起来我需要在屏幕上滑动一点手指.我其实只是想在图像中触摸

                  I'm trying to implement touch event similar to a Touch Up Inside a UIButton. I've seen some codes using touchesBegan:withEvent but it looks I need to slide a bit my finger over the screen. I actually just want to touch in the image

                  代码:

                  - (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {   
                      NSLog(@"Image touched!");
                  }
                  

                  问候!

                  推荐答案

                  您可以使用手势来触摸UIImageView.

                  UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc]
                                           initWithTarget:self action:@selector(ClickEventOnImage:)];
                          [tapRecognizer setNumberOfTouchesRequired:2];
                          [tapRecognizer setDelegate:self];
                          //Don't forget to set the userInteractionEnabled to YES, by default It's NO.
                          myImageView.userInteractionEnabled = YES;
                          [myImageView addGestureRecognizer:tapRecognizer];
                  

                  实现ClickEventOnImage函数.

                  -(void) ClickEventOnImage:(id) sender
                  {
                  
                  }
                  

                  这篇关于为 UIImageView 修饰内部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  WebKit on th iPhone: is it possible to copy text to the clipboad with JavaScript(iPhone上的WebKit:是否可以使用JavaScript将文本复制到剪贴板)
                  Can`t copy file from bundle to documents directory in iOS(无法将文件从捆绑包复制到 iOS 中的文档目录)
                  How to copy a quot;Dictionaryquot; in Swift?(如何复制“字典在斯威夫特?)
                  When compiling for multiple targets in XCode, how do i ensure that certain files will not be included one target(在 XCode 中为多个目标编译时,我如何确保某些文件不会包含在一个目标中)
                  Android file copy(安卓文件拷贝)
                  Android how to detect Copy event of Edittext in android(Android如何在android中检测Edittext的Copy事件)
                  <i id='OB4Nu'><tr id='OB4Nu'><dt id='OB4Nu'><q id='OB4Nu'><span id='OB4Nu'><b id='OB4Nu'><form id='OB4Nu'><ins id='OB4Nu'></ins><ul id='OB4Nu'></ul><sub id='OB4Nu'></sub></form><legend id='OB4Nu'></legend><bdo id='OB4Nu'><pre id='OB4Nu'><center id='OB4Nu'></center></pre></bdo></b><th id='OB4Nu'></th></span></q></dt></tr></i><div id='OB4Nu'><tfoot id='OB4Nu'></tfoot><dl id='OB4Nu'><fieldset id='OB4Nu'></fieldset></dl></div>
                    <legend id='OB4Nu'><style id='OB4Nu'><dir id='OB4Nu'><q id='OB4Nu'></q></dir></style></legend>
                      <tbody id='OB4Nu'></tbody>

                          <tfoot id='OB4Nu'></tfoot>

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

                            <bdo id='OB4Nu'></bdo><ul id='OB4Nu'></ul>