Dale Townsend
Dale Townsend

Reputation: 691

Nested UITableView inside another nested table

I am developing an app that initially displays a table. You tap a cell in the table and the cell expands, showing a table view inside the cell. To do this I implemented the UITableView delegate inside the custom UITableViewCell. I would like to now have a selection on a cell in the second table view to expand the cell and show another table (two levels drop). Is this possible? Would I just create a table on selection (didSelectRowAtIndexPath in the custom cell class)? Where would I put the table methods for it?

enter image description here

Upvotes: 0

Views: 4100

Answers (1)

vikingosegundo
vikingosegundo

Reputation: 52227

Important: You should not embed UIWebView or UITableView objects in UIScrollView objects. If you do so, unexpected behavior can result because touch events for the two objects can be mixed up and wrongly handled. source

As UITableViews subclasses UIScrollViews this applies here too.

What you want can be achieved by using section header views for the coffee displaying view and custom cells for the options.
Or using custom cells for he coffee views and section footer views for the options.

Upvotes: 3

Related Questions