I have a UITabBarController set up in storyboard. I want to pass a dictionary of data from the tab bar controller for use in the appropriate child tab, which is a standard UIVie
If you got an UINavigationController
as one of your UITabBarController
view controllers, you can do the following:
NSArray *viewControllers = [self.tabBarController viewControllers];
UINavigationController *myNavController = (UINavigationController *)viewControllers[2];
MyViewController *myController = [[myNavController childViewControllers] firstObject];
// Remember to alloc/init objects first if the objects haven't been initialized already.
[myController.whateverArray = [[NSArray alloc] initWithArray:@[@"Example1", @"Example2"]];
[self.tabBarController setSelectedIndex:2];