你怎么知道按下返回键时 UITextField 会确认自动更正?
更具体地说,返回键实际上设置为“发送”,并且启用了自动更正。当自动更正出现时,按返回键只会确认自动更正,而不是真正要发送文本。问题是你怎么知道发生了自动更正?我无法在 textFieldShouldReturn 中判断。
顺便说一句,我也考虑过“退出时结束”事件,但我发现只要该事件链接到一个方法,键盘总是会隐藏,而我不希望这样。
Let's be more specific, the return key is actually set to "Send", and with auto correction enabled. When auto correction does appear, pressing return key will only confirm the auto correction and not actually intend to send the text. The question is how do you know that there's an auto correction happens? I cannot tell in textFieldShouldReturn.
By the way, I also considered "Did End On Exit" event, but I find the keyboard always hides as long as the event linked to a method, which I want not.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论