uitextview键盘被卡住了
我正在尝试将键盘解散并通过编程方式进行备份,但是在解雇后,它才会被插入InputAccessoryView出现。你能告诉我出了什么问题吗?我已经附上了两个图像供参考。 谢谢 !
<
textView.resignFirstResponder()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
self.textView.becomeFirstResponder()
}
执行代码
a href =“ https://i.sstatic.net/lc1hi.png”执行
代码
I am trying to dismiss keyboard and bring it back up programmatically, but after dismissal it gets stuck only the inputAccessoryView shows up. Can you please tell me what is going wrong? I have attached two images for the reference.
Thank You !
code
textView.resignFirstResponder()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
self.textView.becomeFirstResponder()
}
before execution of the code
after execution of the code
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下问题解决了问题:
设置默认Lorem强加的文本,并在
viewDidload()
中以编程方式更改此此此内容,或
完全退出模拟器并重新运行应用程序。如果那不起作用,请尝试使用新的模拟器或设备。
The following fixed the issue:
set the default lorem imposed text and change this programmatically in the
viewDidLoad()
OR
Fully quit the simulator and rerun the app. If that doesn't work, try with new simulator or device.