Apologies if this question is a little basic but I've spent several days trying to understand the root cause of this problem without any success.
I am working on an app which relies heavily on UITableView
objects. I can successfully use a UITableViewController
object and display information in a table but I need to be able to have multiple tables on screen citing data from multiple sources and the UITableViewController
seems to be too limited.
I would like to be able to place multiple UITableView
objects with the storyboard then create custom class files which manage the tables. Unfortunately when I've tried this, XCODE doesn't let me select these custom classes to manage the tables.
Although I've found some potential workarounds online I want to understand why selecting a new class to govern a table view is not possible.
[I wanted to post images but apparently I can´t until I have a better reputation...]
It depends on exactly what you did. But, you should really take a different approach:
If you can, use a single table view with multiple sections (with headers / footers).
If you can't do that, create a separate table view controller and table view for each section of information that you want. Then, your 'main' view controller should act as the parent and add all of the other table view controllers as children (addChildViewController:
) and their views as subviews. This approach will keep your code segregated and organised rather than trying to have one controller manage many disparate views.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With