Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a Table with Rows and Columns in 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: enter image description here

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?

like image 537
Vaquita Avatar asked Sep 24 '12 12:09

Vaquita


2 Answers

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...

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

part 1 - part 2

like image 78
Moxy Avatar answered Oct 02 '22 23:10

Moxy


In ios6 you can use a UICollectionView with a UICollectionViewFlowLayout to archive this. A UICollectionView works very similar to a UITableView, but gives you more control over how the cells should be displayed and aligned.

like image 32
Jonathan Cichon Avatar answered Oct 03 '22 00:10

Jonathan Cichon