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

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

      <tfoot id='vU1KO'></tfoot>

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

        当我在 UITextField 中按返回键时如何隐藏键盘?

        时间:2023-07-28
          <i id='0Tfr9'><tr id='0Tfr9'><dt id='0Tfr9'><q id='0Tfr9'><span id='0Tfr9'><b id='0Tfr9'><form id='0Tfr9'><ins id='0Tfr9'></ins><ul id='0Tfr9'></ul><sub id='0Tfr9'></sub></form><legend id='0Tfr9'></legend><bdo id='0Tfr9'><pre id='0Tfr9'><center id='0Tfr9'></center></pre></bdo></b><th id='0Tfr9'></th></span></q></dt></tr></i><div id='0Tfr9'><tfoot id='0Tfr9'></tfoot><dl id='0Tfr9'><fieldset id='0Tfr9'></fieldset></dl></div>
          1. <small id='0Tfr9'></small><noframes id='0Tfr9'>

              <tbody id='0Tfr9'></tbody>

              <legend id='0Tfr9'><style id='0Tfr9'><dir id='0Tfr9'><q id='0Tfr9'></q></dir></style></legend>

                <bdo id='0Tfr9'></bdo><ul id='0Tfr9'></ul>
                <tfoot id='0Tfr9'></tfoot>
                  本文介绍了当我在 UITextField 中按返回键时如何隐藏键盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  单击文本字段会显示键盘.用户按回车键时如何隐藏?

                  Clicking in a textfield makes the keyboard appear. How do I hide it when the user presses the return key?

                  推荐答案

                  首先将你的文件委托给 UITextField

                  First make your file delegate for UITextField

                  @interface MYLoginViewController () <UITextFieldDelegate>
                  
                  @end
                  

                  然后将此方法添加到您的代码中.

                  Then add this method to your code.

                  - (BOOL)textFieldShouldReturn:(UITextField *)textField {        
                      [textField resignFirstResponder];
                      return YES;
                  }
                  

                  同时添加 self.textField.delegate = self;

                  这篇关于当我在 UITextField 中按返回键时如何隐藏键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:iOS:使用 UIView 的 'drawRect:' 与其层的委托 'drawLayer:in 下一篇:是否可以为代表提供“强"参考?

                  相关文章

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

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

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