Dale Townsend Dale Townsend - 1 year ago 149
iOS Question

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

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download