将自定义UITableViewCell中的UITextField移动到屏幕中央,以便键盘不会覆盖它 [英] Move UITextField in custom UITableViewCell to the center of the screen so the keyboard won't cover it

查看:54
本文介绍了将自定义UITableViewCell中的UITextField移动到屏幕中央,以便键盘不会覆盖它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表格,应用程序的用户必须填写才能注册该服务.但是,由于有许多字段需要填写,所以其中一些位于屏幕底部,因此当出现键盘时,该字段将被覆盖,并且用户看不到键入的内容.

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 CellsUITableView,每个都有一个名为textFieldUITextField.

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屋!

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