Dynamic TableView in static TableView cell

I am trying to use a dynamic tableview within a static tableview cell. Are there any best practices or guidance which can show how to implement this.

Is the general idea to have a custom tableviewcell class which sets up the delegate and have the outer tableview send the data to the inner tableview?

Would the inner table view be set in the story board along with its prototype cell or using xib?

Any help would be greatly appreciated!

@thomas_bakonyi Thanks very much for your question!

While what you’re trying to do is complex, it CAN be done. :slight_smile:

I believe the key here is to treat the cell the same way you’d treat the ViewController. Since the cell contains a unique tableView, it will have it’s own delegate & datasource. My advice is to play around with a very basic implementation so that it is easy for you to get it working, and then go from there.

As far as implementation goes, if you’re using storyboards, then use a .xib file for your cell. Because cells are reused, then .xib files would be the most suitable.

Personally, I prefer to do everything in code :slight_smile:

I hope this helps!

All the best.

1 Like

This topic was automatically closed after 166 days. New replies are no longer allowed.