iPhone 自定义手机键盘重叠

发布于 2024-10-03 02:01:54 字数 155 浏览 0 评论 0原文

我有一个带有自定义单元格的 TableView,是我用 Interface Builder 构建的。

在单元格内,我有一个标签和一个文本字段。但是,当我单击文本字段进行书写时,键盘与文本字段重叠,我看不到我在写什么。

我怎样才能避免这种情况?

谢谢

i have a TableView with custom cells that i have built with Interface Builder.

Inside the cell, i have a label and a text field. But when i click on the text field to write, the keyboard overlaps the text field and i can't see what i am writing.

How can i avoid this?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

久隐师 2024-10-10 02:01:54

显示键盘时,您必须调整包含表格视图的视图的大小。这里讨论了你可以做的方法,
如何使 UITextField 在键盘按下时向上移动存在吗?

您可以在 Stackoverflow 中搜索更多有关“iPhone 键盘隐藏文本视图”的信息。

调整视图大小后,您也可以将表格滚动到当前单元格。

You have to resize the view containing the tableview when keyboard is shown. The way you can do is discussed here,
How to make a UITextField move up when keyboard is present?

You can search in Stackoverflow more on 'iphone keyboard hides textview'.

after resizing view, you can scroll table to the current cell too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文