2

So I'm using textfield.returnKeyTYpe = UIReturnKeyDone in my code with my UIKeyboard. The problem that I am running into is that the done button and the hide keyboard button are both performing the same function in that, once they are clicked the keyboard hides but the program continues on to the next field and the keyboard pops up right away.

I want to know if there is something that the UIReturnKeyDone returns when clicked that I can grab to differentiate between clicking the Done key and the hide keyboard key.

Sorry if that does't make sense, I am new to all this.

4

1 回答 1

0

现在有意义了,您需要创建 UIButton 并按下它来隐藏键盘。

当你想隐藏键盘时。

[textView resignFirstResponder];

于 2013-11-27T10:48:00.480 回答