If I understand the view hierarchy correctly, there can only be one view “controller” per screen, which makes absolute sense to me. But I’m a bit confused when it comes to the UITableView and UITableViewController. Say I have a “master” view for my iPad application which has multiple UIView areas within it. Each UIView is loaded from a separate class file which has extended UIView. So far, so good, and the views come up like I want them to.
Now one of the views I would like to have a table of web JSON information for the user to click on. In the iPhone world, I simply pushed another UITableViewController onto the screen, and it held the job of being the delegate and datasource for the self.tableView. However, in the iPad world, that same UITableViewController code, when added as-is inside of my UIView, doesn’t call any of the delegate functions, and I’m assuming this is because the screen already has a view controller on it.
So I’m struggling with understanding where the table delegation goes. Does this UITableViewController now have to become a standard UIView with a UITableView embedded? If so, can the UIView itself be a UITableViewDelegate and UITableViewDatasource? I’ve been trying this with no success. Perhaps the delegate and datasource have to be served by the master UIViewController that makes up my overall application window? I’ve been messing around with this for days now and can’t get my data to show up in the tableView at all.
Thanks for any assistance you can provide!