iPhone滚动视图键盘隐藏文本输入
我有一个长的数据输入屏幕,大约 1200 高。我可以使用手指滑动在数据输入字段之间滚动“确定”。
我想当我按键盘上的 Enter 或某个键时应该能够转到下一个字段?如果是这样,你该怎么做?
另外,除非我将文本输入放置在屏幕顶部,否则当键盘弹出时会覆盖文本框。
我猜这个问题以及上面的问题可能都与确保文本框移动到屏幕顶部进行输入有关?
I have a long data entry screen about 1200 high. I can scroll OK between the fields for data entry using the finger swiping.
I think I should be able to go to the next field when I press enter on the keyboard or some key? If so how do you do that?
Also unless I position the text enter at the top of the screen, when the keyboard pops up if covers the text box.
I am guessing this problem along with the one above might all be to do with making sure the text boxes move to the top of the screen for input?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了添加按钮以推进各种控件,我相信您必须使用自己的按钮自定义键盘视图,然后让它们根据需要调用每个控件上的“becomeFirstResponder”选择器。
为了防止键盘覆盖滚动视图,您需要响应键盘已显示的通知,并重新调整滚动视图的大小以仅占据键盘上方的区域。 Apple 的 UICatalog 示例代码 提供了如何操作的示例这。
In order to add buttons to advance through your various controls, I believe you would have to customize the keyboard view with your own buttons and then have them invoke the "becomeFirstResponder" selector on each control as appropriate.
To prevent the keyboard from covering the scroll view you'll want to respond to the notification that the keyboard has been presented and readjust the size of your scroll view to only occupy the area above the keyboard. Apple's UICatalog sample code has examples for how to do this.