可编辑文本字段的UITableView列表 [英] A UITableView list of editable text fields

查看:125
本文介绍了可编辑文本字段的UITableView列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这可能不是根据苹果的人机界面指南的iPhone,但我想摆脱一个级别的推送视图,并有一个可编辑的文本字段的列表。此外,我希望从视图出现时开始,键盘在屏幕上。



问题是,当我有超过三个这样的字段,然后弹出键盘将覆盖以下字段。而且用户不能向下滚动到他们。我认为这是因为表视图是全屏的。我试图把列表只有高度,因为它将允许键盘可见所有的时间,但没有运气。



任何人都知道我应该如何安排


解决方案

如果你真的不需要键盘走开,UITableView没有理由全屏。您可以像这样更改框架(其中HEIGHT是表格视图将在其原点和键盘顶部之间占用的像素数):



tableView.frame = CGRectMake(0,0,320,HEIGHT);


I know it might not be according to Apple's human interface guidelines for the iPhone, but I want to get rid of one level of pushing views and have a list of editable text fields. Further, I want the keyboard to be on screen from start when the view appears.

The problem is that when I have more than three such fields then the pop-up keyboard will cover the fields below. And the user can't scroll down to them. I think it's because the table view is full-screen. I've tried to make the list only as heigh as it would allow the keyboard to be visible all the time, but no luck.

Anyone knows how I should arrange things to get what I want?

解决方案

If you truly never need the keyboard to go away, The UITableView does not have a reason to be fullscreen. You can change the frame like this (where HEIGHT is the number of pixels the tableview will take up between its origin and the top of the keyboard):

tableView.frame = CGRectMake(0,0,320,HEIGHT);

这篇关于可编辑文本字段的UITableView列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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