0

How to show table view in categories and when clicked on one row it will expand with content? I've seen it in some apps and that's how I know it is possible but can't find any reference or tutorial regarding it.

I would appreciate if someone could help me even if I don't have example code, because I don't know how to start with it.

1337code
  • 93
  • 1
  • 2
  • 7
  • I think this link will get you started http://stackoverflow.com/questions/460014/can-you-animate-a-height-change-on-a-uitableviewcell-when-selected – bbarnhart Dec 28 '11 at 15:29

2 Answers2

1

I think this should be done by means of table view. I personally did this the following way: at first there was a table view with 5 sections and every section had no rows in it, only a header. When the header is clicked the sections "expands" - I add the rows to the section (insertRowsAtIndexPaths). If the section header is clicked again, I delete the rows from datasourse (deleteRowsAtIndexPaths). Hope this is useful

dariaa
  • 6,285
  • 4
  • 42
  • 58
0

Go through this sample code

https://github.com/adamhoracek/KOTree

The table view will look like this

https://i.stack.imgur.com/mdnAl.png

Midhun MP
  • 103,496
  • 31
  • 153
  • 200
Rashid
  • 829
  • 7
  • 6