1

I've created a Tab Bar application (2 tabs) then merged a Utility Application to it. So now i have an App with two tabs and a Flip animation.

When the App loads, Tab1 has the info button and on ButtonPressInfo the view flips giving me a FlipSideView with no tabs. What im stuck on is, i wish to press the "Done" button on FlipSideView but return to the second tab.

Ive tried several examples but I always get the same result, that is when you press the "Done" button it always returns to first tab.

testing123AppDelegate = (Testing123AppDelegate *)[[UIApplication sharedApplication] delegate];
NSArray *vcs = [testing123AppDelegate.tabBarController viewControllers];
[[vcs objectAtIndex:1] viewWillDisappear:TRUE];
[self.delegate flipsideViewControllerDidFinish:self];

thank you.

david-l
  • 623
  • 1
  • 9
  • 20

1 Answers1

0

In your delegate's implementation of flipsideViewControllerDidFinish:, add a line like this:

myTabBarController.selectedIndex = 1;

You might also have a look at the selectedViewController property on UITabBarController.

adamrothman
  • 956
  • 9
  • 9