Search code examples
iosipaduiviewcontrolleruitabbarcontrolleruisplitviewcontroller

Call UISplitViewController from another UIViewController in a UITabBarController app


I'm creating an universal App and have a UITabBarController for my app's Views. The first tab is a UISplitViewController created programatically and the others are UIViewControllers designed in IB. How can I call the UISplitViewController (my first TabBar) and pass a parameter from another TabBar's UIViewController (for example, by tapping a button)?


Solution

  • You can try this:

    [((MyViewControllerType*)[self.tabBarController.viewControllers objectAtIndex:0]) callMyMethodWithObject:object]