Dismissing the keyboard when a button is pressed, programmatically with swift?

后端 未结 4 1520
北恋
北恋 2021-02-15 00:07

How can I dismiss the keyboard when a button is pressed, programmatically with swift?

4条回答
  •  长情又很酷
    2021-02-15 00:14

    Setting the UITextfield delegate programmatically swift 2.2 Add UITextFieldDelegate in your class.

    https://stackoverflow.com/a/31689406/5576747

提交回复
热议问题