Say i have a tab bar with 5 ViewControllers, And a left and right menus.
My deck ViewController holds the tab bar as a center ViewController:
self.tabBarController.viewControllers = @[UINAVIGATIONCONTROLLER(feedController),
UINAVIGATIONCONTROLLER(myProfileController),
UINAVIGATIONCONTROLLER(topTradersController),
UINAVIGATIONCONTROLLER(stocksListController),
// UINAVIGATIONCONTROLLER(watchlistController),
];
self.deckController = [[STViewDeckController alloc] initWithCenterViewController:self.tabBarController
leftViewController:settingsController
rightViewController:watchlistController];
I would like to make on of the tab bar buttons open the right side menu, instead of acutely making the tabBar push that ViewController.
Say I would like the "watchlistController" tabBar button open the side menu, How could i do that?
Oh, and I'm using "IIViewDeckController" for deckController
Thanks
You can prevent a tabBarController from showing the view/viewController associated with the tab by using the
UITableControllerDelegate
and the method- (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController
Add the following to your code:
and then implement this:
This should do the trick for you.