在iOS中创建包含行和列的表 [英] Creating a Table with Rows and Columns in iOS

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

问题描述

我想在iOS中创建一个包含行和列的表。我们还可以选择向表中添加金额。示例表的屏幕截图发布如下:

I would like to create a table in iOS that have some rows and columns. We also have an option to add amounts to the table. A screenshot of the sample table is posted below:

细胞需要可编辑。有没有办法使用iOS中的默认UITableView来实现它。或者使用按钮或文本字段等创建它是否有用?

The cells needs to be editable. Is there a way to implement this using the default UITableView in iOS. Or Is it a good to create it using buttons or textfields etc?

推荐答案

这不是一个简单的解决方案,但你可以使用就像Pulse应用程序一样,在表视图(垂直)的每个单元格内旋转(水平) UITableView 。仅使用标签使其易于管理,但如果您计划处理选择行,排序等事件,那么excel外观可能会更难。

It would not be an easy solution but you can use a rotated (horizontal) UITableView inside each cell of a table view (vertical) just like the Pulse app. Using only labels makes it easy to manage but the "excel" look could be harder if you're planning handling events like selecting rows, sort...

这是两个关于如何使用横向表的部分教程(http://www.raywenderlich.com/):

Here's a two part tutorial on how to use horizontal tables (http://www.raywenderlich.com/) :

part 1 - 部分2

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

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