<legend id='8OSiD'><style id='8OSiD'><dir id='8OSiD'><q id='8OSiD'></q></dir></style></legend>

      • <bdo id='8OSiD'></bdo><ul id='8OSiD'></ul>
    1. <small id='8OSiD'></small><noframes id='8OSiD'>

      <tfoot id='8OSiD'></tfoot>

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

        iOS:将 Exclusive Touch 设置为视图中的所有按钮

        iOS: setting Exclusive Touch to all buttons in a view(iOS:将 Exclusive Touch 设置为视图中的所有按钮)
        • <bdo id='C7Sbq'></bdo><ul id='C7Sbq'></ul>

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

                <tbody id='C7Sbq'></tbody>
              <tfoot id='C7Sbq'></tfoot>

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

                  <i id='C7Sbq'><tr id='C7Sbq'><dt id='C7Sbq'><q id='C7Sbq'><span id='C7Sbq'><b id='C7Sbq'><form id='C7Sbq'><ins id='C7Sbq'></ins><ul id='C7Sbq'></ul><sub id='C7Sbq'></sub></form><legend id='C7Sbq'></legend><bdo id='C7Sbq'><pre id='C7Sbq'><center id='C7Sbq'></center></pre></bdo></b><th id='C7Sbq'></th></span></q></dt></tr></i><div id='C7Sbq'><tfoot id='C7Sbq'></tfoot><dl id='C7Sbq'><fieldset id='C7Sbq'></fieldset></dl></div>
                  本文介绍了iOS:将 Exclusive Touch 设置为视图中的所有按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我的应用在一个窗口中有很多按钮,我想将它们全部设置为 Exclusive Touch.你对此有什么建议吗?谢谢

                  My app has many buttons in a Window and I want to set Exclusive Touch all of them together. Do you have any suggestion about this? Thanks

                  推荐答案

                  有一种方法可以为您的应用程序中的所有按钮设置独占触摸,可能会有所帮助.

                  There is a way to set exclusive touch to all buttons in your app, may be helpful.

                  #import </usr/include/objc/objc-class.h>
                  
                  static IMP gOringinalWillMoveToSuperview = nil;
                  
                  static id newMoveToSuperviewPlusSettingExclusiveTouch(id self,SEL selector,...)
                  {
                      va_list arg_list;
                      va_start( arg_list,selector);
                      gOringinalWillMoveToSuperview(self,selector,arg_list);
                      [self setExclusiveTouch:YES];
                      return nil;
                  }
                  
                  -(void)addSettingExclusiveTouchToAllUIViewMethodWillMoveToSuperview
                  {
                      gOringinalWillMoveToSuperview = class_getMethodImplementation([UIButton class], @selector(willMoveToSuperview:));
                      class_replaceMethod([UIButton class], @selector(willMoveToSuperview:), &newMoveToSuperviewPlusSettingExclusiveTouch, "v@:");
                  }
                  

                  如果不明白这个,可以参考this和这个.

                  if you don't understand this, you can refer to this and this.

                  这篇关于iOS:将 Exclusive Touch 设置为视图中的所有按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  UIButton title text color(UIButton 标题文本颜色)
                  Stretch background image for UIButton(为 UIButton 拉伸背景图像)
                  Using Tint color on UIImageView(在 UIImageView 上使用 Tint 颜色)
                  How can I change UIButton title color?(如何更改 UIButton 标题颜色?)
                  iPhone UIButton - image position(iPhone UIButton - 图像位置)
                  UIButton remove all target-actions(UIButton 删除所有目标动作)

                      <tbody id='ATAta'></tbody>
                    <legend id='ATAta'><style id='ATAta'><dir id='ATAta'><q id='ATAta'></q></dir></style></legend>
                    <tfoot id='ATAta'></tfoot>

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

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

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