【发布时间】:2018-12-31 12:33:13
【问题描述】:
我目前正在尝试在单击按钮时从上一个文本字段中关闭键盘。我目前有一种方法可以关闭键盘,尽管它只在用户点击时才会关闭。
【问题讨论】:
-
可能重复 Close iOS Keyboard by touching anywhere using Swift。您也可以考虑对“resginFirstResponder”进行一些研究
-
self.view .endEditing(true)
标签: swift xcode keyboard textfield