i have a tabBarController with 3 items.
In my first view in my first item of my tabBar i have a tableview and a navigationController.
how to go in the second item of my tabBar when i push 1 row in my tableview in the fist item of my tabBar?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
Second *two = [[Second alloc] initWithNibName:@"Second" bundle:nil];
[self.navigationController pushViewController:two animated:YES];
[two release];
thks
Use the selectedIndex property on the UITabBarController. More information can be found in the UITabBarController Class Reference.
or use
Note that the indices start at 0, so the second tab is at index 1.