将自定义UITableViewCell中的UITextField移动到屏幕中央,以便键盘不会覆盖它 [英] Move UITextField in custom UITableViewCell to the center of the screen so the keyboard won't cover it
问题描述
我有一个表格,应用程序的用户必须填写才能注册该服务.但是,由于有许多字段需要填写,所以其中一些位于屏幕底部,因此当出现键盘时,该字段将被覆盖,并且用户看不到键入的内容.
I have a form that the user of the app must fill in order to register to the service. However, as there are many fields that need to be filled, some of them are at the bottom of the screen, so when the keyboard appears, the field is covered and the user can't see what's typed.
我正在使用带有自定义Prototype Cells
的UITableView
,每个都有一个名为textField
的UITextField
.
I'm using a UITableView
with custom Prototype Cells
, each one has a UITextField
named textField
.
推荐答案
有很多解决您问题的方法.您可以使用此.有一个示例代码也可以处理UITableView
的键盘动画.
There are a lot of solutions to your problem. You can use this. There's a sample code which handles the keyboard animation for UITableView
as well.
这篇关于将自定义UITableViewCell中的UITextField移动到屏幕中央,以便键盘不会覆盖它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!