Reputation: 1579
Say i have two controllers and probably a stupid question.
Should i/ Does one load the data needed in 2. within the table view class 1. and send it to the view controller, or load it in the view controller class 2. that gets shown when cell has been tabbed?
NB: When a cell item is tabbed, i will be using ActivityIndicator to show a loading screen.
Upvotes: 0
Views: 13
Reputation: 89559
Your question isn't super clear.
A view controller contains a view (and subviews, like your UITableView), so many developers typically use their subclassed UIViewController as a UITableViewDataSource
for a table view that it's displaying.
If you have a more complicated architecture, perhaps you can designate another object to be your table view's data source.
If you select (or tab) on a different cell in the table, you can use UITableViewDelegate
methods to detect another cell was selected and then adjust the data source and reload the data.
Upvotes: 1