Sometimes you want to jump between tabs in your iPhone app programatically (ie you don’t want the user to have to touch the tab prior to displaying it). This is very easy to achieve:

self.tabBarController.selectedIndex = 3;

Where selectedIndex reflects the tab you wish to select (from left to right, starting at 0 for the first tab). The only thing to note, is that the UIViewController viewWillAppear method will not get called. So you may need to call this yourself, if you need to do something on the tab prior to it being displayed:

self.tabBarController.selectedIndex = 3;
[self.tabBarController.selectedViewController viewDidAppear:YES];