I'm a total newbie in ios, so judge my question by that.
I have a code to use. In the code i have a vertical tabbar controller inherited from FSVerticalTabBarController. We use this tabbar controller to switch between viewcontrollers.
What i want is to have the viewcontrollers come up with an animation. Any kind of default animation is fine. How can i do that? here's the code, and thank you for your help:
@implementation AIVerticalTabBarController
@synthesize appDelegate;
- (void)viewDidLoad
{
[super viewDidLoad];
[self setDelegate:self];
[[self tabBar] setBackgroundColor:[UIColor darkGrayColor]];
NSArray *titles = [NSArray arrayWithObjects:@"Home", @"Export", @"Settings", @"Titles", @"Slides", @"Text doc", nil];
NSArray *viewClasses = [NSArray arrayWithObjects:@"AIViewController", @"AIViewController", @"AIViewController", @"AITitlesViewController", @"AISlidesViewController", @"AIViewController", nil];
NSMutableArray *controllersToAdd = [[NSMutableArray alloc] init];
for (NSUInteger i = 0; i < [titles count]; i++) {
AIViewController *viewC = [[NSClassFromString([viewClasses objectAtIndex:i]) alloc] init];
[viewC setAppDelegate:appDelegate];
UITabBarItem *tbi = [[UITabBarItem alloc] initWithTitle:[titles objectAtIndex:i] image:nil tag:i];
[viewC setTabBarItem:tbi];
[controllersToAdd addObject:viewC];
}
[self setViewControllers:[NSArray arrayWithArray:controllersToAdd] animated:YES];
}
@end