textField 连线方法 选择 did end on exit
正常情况下是,成功发送消息,收回键盘。
这个时候,如果不想收起键盘,然后光标还是在textField上。
该怎么实现?
在textField 连线方法里 添加 becomeFirstResponder 方法 。还是没能实现。
需求:用户聊天时,发送消息之后,键盘不收起,光标还在当前textField上。
怪我咯2017-04-17 17:45:26
Process the sending related logic in the proxy method textFieldShouldReturn, do not call resignfirstresponder. Do not connect the did end on exit event.
ringa_lee2017-04-17 17:45:26
Why choose to use did end on exit event? Using this event means that the keyboard will be retracted by default. Just use Touch Up Inside to write the event, and then textField becomeFirstResponder will put the cursor on it.
PHP中文网2017-04-17 17:45:26
To recover the keyboard, you call resignfirstresponder. If you don’t call it, the keyboard will not be recovered
迷茫2017-04-17 17:45:26
First remove all connection methods, add textFieldShouldReturn, and return false