I've got a TableViewController
where I want to display some data from AppDelegate.m
To do this I put some code in AppDelegate
to Assign my Array to the property of the viewController
, but I've got some problem with the syntax to do this.
My storyboard map is like that :
- The storyboard’s initial view controller is a
Tab Bar Controller
- The
CalculateViewController
sits inside a navigation controller in the first tab - The
AircraftSelectViewController
sits inside the first cell of myCalculateViewController
So I've got this part of code :
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
UINavigationController *navigationController = [tabBarControllerNew viewControllers][0];
But I don't know how to explain to AppDelegate
that my AircraftSelectViewController
(UITableViewController
) sits inside another UITableViewController
(CalculateViewController
).
Anyone knows how to do this ? thx
EDIT :
I would like to do something like this, but i don't find the right syntax :
UITabBarController *tabBarControllerNew = (UITabBarController *)self.window.rootViewController;
UINavigationController *navigationControllerNew = [tabBarControllerNew viewControllers][0];
CalculateViewController *calculateViewController = [navigationControllerNew viewControllers][0];
AircraftSelectViewController *aircraftSelectViewController = [calculateViewController tableView][0];
aircraftSelectViewController.aircraft = _aircraft;