You simply have a public method in your UITableViewController
and run it by UIViewController
. Let's assume your UITableViewController
has the following method in your header:
- (void)preencheTabela:(NSArray *)lista;
And the implementation:
- (void)preencheTabela:(NSArray *)lista {
// TODO preencher sua lista atual com a recuperada
[self.tableView reloadData];
}
And in your UIViewController
, once you have the reference of Controller
with the table that was inserted in container , just run your method:
[self.referanciaTabela preencheTabela:listaEnviada];
Clarifying that it is not for the container that you will pass, but for the Controller
that is inside the container . Is it clear?
Your reference, already with the container added from the storyboard , looks more or less like this in viewDidLoad:
eg:
self.referanciaTabela = [self.childViewControllers firstObject];