views:

105

answers:

3

I have seen apps that have table views that have rows that contain 2 or 3 cells. Something like the following:

| 3 cells in one row        |

/-------\ /-------\ /-------\
|do this| |  do   | |do smth|   <--- table view row that contains 3 cells
|       | | that  | | else  |
\-------/ \-------/ \-------/

When you click on a cell they behave exactly like a cell and have different events. Is there a simple way to do this or do I have to use some trick.

+2  A: 

If they don't have to look like cells, I would use 3 Buttons in a custom UITableViewCell. They also get blue if you tap on them.

Sandro Meier
Adding buttons seems ok but I don't know if I can make the container cell have transparent background so the buttons look like real cells. Gonna try out.
kudor gyozo
Ah you want them to look real. Than I've another Idea. Try to place 3 UITableviews side by side and synchronize their movement. ;-)
Sandro Meier
Tables and table cells can have transparent backgrounds, at the expense of scrolling performance.
tc.
+5  A: 

Those aren't actually separate cells. A UITableView can only contain rows, not columns. But each cell can be laid out with its content in three equal-sized areas, thereby mimicking a real grid of content.

Dan Ray
A: 

Adding buttons and then using the code from here seems to be the easiest way. Although the initWithFrame:CGRectZero looks hacky, it works.

kudor gyozo