I have an iPad app with splitview and a right bar button in the navigation bar of the detailviewcontroller.
This button calls a popover constituted of a navigation controller and two table views. as shown in the following picture
As the storyboard is small on the picture I add some explanation. The White controller is the detailViewController (right hand side of the splitviewcontroller), which is inside a navigtion controller. The three views on the right side of the white view are from left to right : navigationController, firstTableView, secondTableView.
My problem is that I need to pass parameters to the first table view to configure it correctly.
I use to do it like that when view controller were sharing the same navigation controller.
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if([[segue identifier] isEqualToString:@"popoverButtonSegue"]){
MyPopoverFirstTableViewController *popoverFirstTVC = [[MyPopoverFirstTableViewController alloc] init];
popoverFirstTVC = segue.destinationViewController;
popoverFirstTVC.property1 = aProperty1;
popoverFirstTVC.property2 = aProperty2;
}
}
My Problem is that I get an error doing this because the destination controller is not my popoverFirstTableViewController but the NavigationController and the navigation controller of course does not haver "property1" and "property2".
Perhaps it's a basic question but I am stuck here.
How do I do to configure my tableview by assigning some of its properties I have defined when this table is inside a navigation controller ?