0
votes

I am developing one i pad application using story board.In my storyboard i have tab bar controller and another 4 view controllers are connected to tab bar controller are tab items.I have one button in the first view controller.If i click that button i need to display 4th view controller.If i give a direct segue from first view controller to 4th view controller using

[self performSegueWithIdentifier:@"SegueIdentifier" sender:nil];

the 4th view controller is appeared but the tab bar display at the bottom is disappear.

2

2 Answers

0
votes

You need to do something like this when the button is pressed...

[self.tabBarController setSelectedIndex:3];

This will tell the tab bar controller to change the selected tab.

0
votes

Try use it->

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([segue.identifier isEqualToString:@"SegueIdentifier"]) {
        [self.tabBarController setSelectedIndex:3];
    }
}