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

    <tfoot id='e7s6i'></tfoot>
  • <legend id='e7s6i'><style id='e7s6i'><dir id='e7s6i'><q id='e7s6i'></q></dir></style></legend>

    1. <i id='e7s6i'><tr id='e7s6i'><dt id='e7s6i'><q id='e7s6i'><span id='e7s6i'><b id='e7s6i'><form id='e7s6i'><ins id='e7s6i'></ins><ul id='e7s6i'></ul><sub id='e7s6i'></sub></form><legend id='e7s6i'></legend><bdo id='e7s6i'><pre id='e7s6i'><center id='e7s6i'></center></pre></bdo></b><th id='e7s6i'></th></span></q></dt></tr></i><div id='e7s6i'><tfoot id='e7s6i'></tfoot><dl id='e7s6i'><fieldset id='e7s6i'></fieldset></dl></div>
        <bdo id='e7s6i'></bdo><ul id='e7s6i'></ul>
      1. 如何禁用 UIButton?

        时间:2023-07-09

            • <bdo id='8a4Ws'></bdo><ul id='8a4Ws'></ul>

              <small id='8a4Ws'></small><noframes id='8a4Ws'>

                <tbody id='8a4Ws'></tbody>

              1. <tfoot id='8a4Ws'></tfoot>

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

                  <i id='8a4Ws'><tr id='8a4Ws'><dt id='8a4Ws'><q id='8a4Ws'><span id='8a4Ws'><b id='8a4Ws'><form id='8a4Ws'><ins id='8a4Ws'></ins><ul id='8a4Ws'></ul><sub id='8a4Ws'></sub></form><legend id='8a4Ws'></legend><bdo id='8a4Ws'><pre id='8a4Ws'><center id='8a4Ws'></center></pre></bdo></b><th id='8a4Ws'></th></span></q></dt></tr></i><div id='8a4Ws'><tfoot id='8a4Ws'></tfoot><dl id='8a4Ws'><fieldset id='8a4Ws'></fieldset></dl></div>
                  本文介绍了如何禁用 UIButton?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在做一个项目,我必须在一个 plist 中显示照片库的所有照片,并在 UIButtons 上水平显示它们.

                  I am working on a project in which I have to show all photos of Photo Library in a plist and show them horizontally on UIButtons.

                  我的应用程序也会有一个编辑按钮:当用户单击此按钮时,每个按钮上应该会显示一个删除标记(例如通常出现在其他 iPhone/iPad 应用程序中).

                  My app will also have an edit button: when the user clicks this button, a delete mark (such as usually appears in other iPhone/iPad apps) should show on each button.

                  但关键是:一旦这个删除标记出现,按钮的功能应该被禁用.我尝试使用以下方法完成此操作:

                  But here's the crucial bit: as soon as this delete mark appears, the functionality of the button should be disabled. I've tried accomplishing this with the following:

                  {
                    editbutton.enabled=NO;
                  }
                  

                  ...但它既不会产生错误也不会起作用.我该怎么办?

                  ...but it neither produces an error nor works. What should I do?

                  推荐答案

                  请设置这个...

                   editButton.userInteractionEnabled = NO; 
                  

                  或者你可以使用

                   editButton.enabled = NO;
                  

                  这篇关于如何禁用 UIButton?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:可以同时具有图像和文本的 UIButton 吗? 下一篇:如何在 UIButton 子类中覆盖 -drawrect?

                  相关文章

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

                1. <legend id='RRok3'><style id='RRok3'><dir id='RRok3'><q id='RRok3'></q></dir></style></legend>

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