textView.becomefirstresponder()和敲击文本视图之间的区别?
我有一个带有多个文本字段和一个文本视图的应用程序页面。 TextView类似于聊天应用程序上的消息栏。
当我点击消息文本视图框时,我编写的代码根据键盘高度调整视图。 但是,当我调用MessageTextView.becomefirstresponder()时,视图不会使用键盘升高。
textView.becomefirstresponder()和在TextView上敲击?
- 我已经测试过,并且可以看到提高视图的代码在调试器中调用。它只是不会在屏幕上执行。
- 我还测试了
I have an app page with multiple textfields and one textview.
The textview is similar to the message bar on chat apps.
When I tap the message textView box, the code I wrote adjusts the view according to the height of the keyboard.
But when I call messageTextView.becomeFirstResponder() instead, the view does not raise with the keyboard.
Is there a difference between textView.becomeFirstResponder() and just tapping on the textView?
- I have tested and can see that the code to raise the view is called in the debugger. it just don't execute on screen.
- I have also tested and see that becomeFirstResponder() is returning true
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论