I have an app with three tabs that switch views instantaneously when the user taps them. The first view is a table view selecting which 'location type' to filter by, to only show those pins (add those annotations) to the second view, a MapView.
When a table cell is clicked, it switches instantaneously to the mapview, using this code:
self.tabBarController.selectedIndex=1;
However, I would like to do this with a slide-in-from-right animation, like the one you get when drilling down a hierarchy of table views.
I tried this:
[self.navigationController pushViewController:[self.tabBarController.viewControllers objectAtIndex:1] animated:YES];
which compiles without error or warning, but does not switch views.
How do I 'apply' a navigation controller 'onto' a tab bar controller? Or is there some way to select another viewcontroller and specify an animation?