用户登录
用户注册

分享至

如何关闭 iOS 键盘?

  • 作者: 飘在天空的羽
  • 来源: 51数据库
  • 2023-02-09

问题描述

我有一个 UITextfield,我想关闭它的键盘.无论我使用什么代码,我似乎都无法让键盘消失.

I have a UITextfield that i'd like to dismiss the keyboard for. I can't seem to make the keyboard go away no matter what code i use.

推荐答案

[myTextField resignFirstResponder]

这里,显示和隐藏键盘部分的第二段.

Here, second paragraph in the Showing and Hiding the Keyboard section.

软件
前端设计
程序设计
Java相关