在用户完成输入或则点击空白时,我们希望能够隐藏键盘。可用如下Code实现。

// _searchBar是当前输入的焦点。
- (IBAction)dismissKeyboard:(id)sender;
{
    [_searchBar resignFirstResponder];
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2021-09-27
  • 2021-09-05
  • 2021-04-02
  • 2021-06-21
  • 2021-11-01
猜你喜欢
  • 2021-12-05
  • 2022-02-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
  • 2022-12-23
相关资源
相似解决方案