uitableview没有用键盘调整大小 [英] uitableview not resizing with keyboard

查看:127
本文介绍了uitableview没有用键盘调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个视图控制器。
设置一个包含大量包含文本标签的自定义单元格的tableview。当键盘出现时,tableview的框架不会自动调整大小。界面构建器中是否有一个我缺少的复选框?

I have created a view controller. Setup a tableview that has a bunch of custom cells that contain text labels. When the keyboard comes up the frame of the tableview is not resizing automatically. Is there a checkbox in interface builder that I'm missing or something?

我应该检查哪些设置?

推荐答案

如果您使用 UIViewController ,则必须在出现键盘时编写调整大小的代码。你可以处理 UIKeyboardWillShowNotification,UIKeyboardDidShowNotification,UIKeyboardWillHideNotification,UIKeyboardDidHideNotification 来适当调整tableview的大小。

If you are using UIViewController, you must write resizing code when keyboard appears. You can handle UIKeyboardWillShowNotification, UIKeyboardDidShowNotification, UIKeyboardWillHideNotification, UIKeyboardDidHideNotification for resizing the tableview appropriately.

这篇关于uitableview没有用键盘调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆