Quote:
Originally Posted by Wikiboo
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.
|
You use the method insertRowsAtIndexPaths:withRowAnimation:
You have to change your data source first to add the extra rows of content, and then use the insert method to get the table view to animate them into place.
We use this approach for a help system in our apps. We have a sectioned table where each section starts out with 1 row, the title of the help section. When you tap on a section's title, it adds a second row for the section's help text, then calls insertRowsAtIndexPaths:withRowAnimation: to animate the extra row into place.