PDA

View Full Version : Simulate TabBar press from ViewController




jjgraz
Apr 27, 2009, 11:07 PM
How do I simulate a TabBar button pressed from within a DetailViewControllers Method.....? The delegate for TabBarController is appDelegate.


aViewController.m


- (IBAction)buttonPressed:(id)sender{
*********want to use.......rootController.selectedIndex = 4;********
}


It doesn't recognize rootController.

Thank you.



jjgraz
Apr 28, 2009, 03:20 PM
works with:



self. tabBarController.selectedIndex = 0;