UITabBarController
UITabBarController is the typical tab bar you see at the bottom of an iPhone application:
In your App Delegate file, inside the application:didFinishLaunchingWithOptions method:
UITabBarController *tabBarController = [[UITabBarController alloc] init]; NSArray *viewControllers = [NSArray arrayWithObjects: viewController1, viewController2, viewController3, nil]; [tabBarController setViewControllers:viewControllers]; [[self window] setRootViewController:tabBarController];
To set titles, in each controller representing a tab bar item:
- (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)bundle { Â Â self = [super initWithNibName:nil bundle:nil]; Â Â if (self) Â Â { Â Â Â Â UITabBarItem *item = [self tabBarItem]; Â Â Â Â [item setTitle:@"First"]; Â Â Â Â UIImage *image = [UIImage imageNamed:@"circle.png"]; Â Â Â Â [item setImage:image]; Â Â } Â Â return self; }












