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

<small id='9pqwG'></small><noframes id='9pqwG'>

  • <tfoot id='9pqwG'></tfoot>

    • <bdo id='9pqwG'></bdo><ul id='9pqwG'></ul>
      <legend id='9pqwG'><style id='9pqwG'><dir id='9pqwG'><q id='9pqwG'></q></dir></style></legend>

        按下 UISearchBar x 按钮

        时间:2023-09-12
            <tbody id='mYrIn'></tbody>
          <tfoot id='mYrIn'></tfoot>

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

                <legend id='mYrIn'><style id='mYrIn'><dir id='mYrIn'><q id='mYrIn'></q></dir></style></legend>
                • <small id='mYrIn'></small><noframes id='mYrIn'>

                • 本文介绍了按下 UISearchBar x 按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  按下x"按钮时如何处理事件?

                  How handle the event when press the 'x' button?

                  我尝试了这种方法,但不起作用.

                  I try this method but not works.

                  -(void)searchBarCancelButtonClicked:(UISearchBar *)searchBar{
                  
                  }
                  

                  推荐答案

                  我不认为有一个简单的方法可以连接到 X 按钮.

                  I don't think there's an easy way to hook into the X button.

                  但是,您可以直接了解它的结果:清除文本.

                  However, you can hook into its direct consequence: cleared text.

                  试试这个:

                  func searchBar(searchBar: UISearchBar, textDidChange searchText: String) {
                      if searchText == "" {
                          print("UISearchBar.text cleared!")
                      }
                  }
                  

                  副作用是当您手动清除文本时也会调用它.

                  The side effect is this also gets called when you manually clear your text.

                  这篇关于按下 UISearchBar x 按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何检测和编程 iPhone 的震动 下一篇:iOS CoreBluetooth:centralManager:didConnectPeripheral/didFai

                  相关文章

                  <tfoot id='ywDIY'></tfoot>

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

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