在iphone中将列和行添加到表中? [英] Adding columns and rows to table in iphone?

查看:27
本文介绍了在iphone中将列和行添加到表中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以让表格由可变的行和列组成,其中包含可以输入数据的文本字段.UItableView 只有 1 列且不超过 1 列.

Is there a way in which a table can be made of variable rows and columns having text fields where data can be entered.UItableView have only 1 column and not more than 1 column.

谢谢

推荐答案

查看这篇文章,了解有关在表格视图中绘制网格的一些示例代码:在 UITableView 中绘制网格.这是自定义表格视图以显示多列的一种可能性.

Have a look at this post for some sample code about drawing a grid in your table view: Drawing a Grid in a UITableView. This is one possibility to customize a table view so that it shows multiple columns.

该示例使用 UILabel 对象来填充各个单元格.因此,您可能还会找到一种简单的方法使它们看起来可编辑(或在 ableView cellForRowAtIndexPath 中使用 UITextField 而不是 UILabel).

The sample uses UILabel objects to fill the individual cells. So you might also find an easy way to make them appear editable (or use UITextField instead of UILabel in ableView cellForRowAtIndexPath).

这篇关于在iphone中将列和行添加到表中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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