I have one ViewController that takes objects from CoreData and build with them a UITableView.
When a user press a row, I get the reportage object and pass it to the next view controller using:
Reportage *reportage = [self.reportages objectAtIndex:indexPath.row];
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
ReportageTeaserPanelViewController *rightController = (ReportageTeaserPanelViewController*)self.menuContainerViewController.rightMenuViewController;
rightController.reportage = reportage;
[self.menuContainerViewController toggleRightSideMenuCompletion:nil];
The variable reportage is declared as strong in the controller ReportageTeaserPanelViewController.
The problem is the following. If I have to reload asynchronously the objects in the array of the parent view controller because of there is an update in my web service, the variable reportage gets nil in the controller ReportageTeaserPanelViewController. I thought that using a strong reference, the controller ReportageTeaserPanelViewController should be keep the "old" reportage object although it disappears from the array.
Is the any explanation for this behaviour?
Thanks
reportageis nil after executing the first statement above it's becauseself.reportagesis nil. It's also possible, of course, that you never actually setrightController.reportagebecauserightControlleris nil.