Reputation: 3038
I was wondering how to make a UITable have columns. Or, is there a better way to create an actual table that looks like a grid. I want to have 3 columns. How can I do this?
Upvotes: 0
Views: 490
Reputation: 12988
If you don't mind the fact that you cannot scroll horizontally you can just use a custom UITableViewCell
to give the illusion of columns. If you really want columns (like a spreadsheet) you need to subclass UIScrollView
and implement UITableView
-like view caching. Luckily Apple has some sample code which shows how to do this, see TiledScrollView.m
Upvotes: 0
Reputation: 12254
The UITableView doesn't have support for more than one column. However, this can be easily fixed if you create your own custom UITableViewCell-s. You would need to stash three different views into the cell and then add whatever you want in them.
Upvotes: 3