设备旋转时键盘的奇怪行为
This is something that happens to me really often. I have a textfield in a table view cell, when I try to edit the textfield the keyboard appears, and when I rotate the device from landscape to portrait, this is what I get.
Any ideas?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
感谢您无数的评论和回答 jejejeje 显然这是我的错误。
当您将焦点文本字段放入单元格中并使用 [tableView reloadData] 强制表格重新加载时,会发生此行为;在旋转事件上,例如shouldRotateInterfaceOrientation:或didRotateFromInterfaceOrientation:
希望这对某人有帮助。
Thank you for the uncountable amount of comments and answers jejejeje apparently this was my mistake.
This behavior occurs when you have a focused textField into a cell, and force table to reload using [tableView reloadData]; on a rotation event, like shouldRotateInterfaceOrientation: or didRotateFromInterfaceOrientation:
hope this helps to someone.