<img src="http://office.nousguide.com/nouslogosmall.png" alt="NOUSguide Inc." title="NOUSguide Inc." title" style="display:block; margin: 10px auto 30px auto;" class="center">
A custom TabBarController which can be positioned on the bottom, top, left or top. Utilizes iOS 5 Containment API if possible, but works on iOS 4 too. The TabBar is fully customizable with a tintColor or background image as well as the possibility to show/hide the item highlight and the possibility to change the text colors, have image-only tabBar items etc.
NGColoredViewController *vc1 = [[NGColoredViewController alloc] initWithNibName:nil bundle:nil];
NGColoredViewController *vc2 = [[NGColoredViewController alloc] initWithNibName:nil bundle:nil];
NGColoredViewController *vc3 = [[NGColoredViewController alloc] initWithNibName:nil bundle:nil];
NGColoredViewController *vc4 = [[NGColoredViewController alloc] initWithNibName:nil bundle:nil];
NGColoredViewController *vc5 = [[NGColoredViewController alloc] initWithNibName:nil bundle:nil];
vc1.ng_tabBarItem = [NGTabBarItem itemWithTitle:@"Home" image:image1];
vc2.ng_tabBarItem = [NGTabBarItem itemWithTitle:@"Images" image:image2];
vc3.ng_tabBarItem = [NGTabBarItem itemWithTitle:@"Live" image:image3];
vc4.ng_tabBarItem = [NGTabBarItem itemWithTitle:@"Contact" image:image4];
vc5.ng_tabBarItem = [NGTabBarItem itemWithTitle:@"Settings" image:image5];
NSArray *viewController = [NSArray arrayWithObjects:vc1,vc2,vc3,vc4,vc5,nil];
NGTabBarController *tabBarController = [[NGTestTabBarController alloc] initWithDelegate:self];
tabBarController.animation = NGTabBarControllerAnimationMoveAndScale;
tabBarController.layoutStrategy = $isPhone() ? NGTabBarLayoutStrategyEvenlyDistributed : NGTabBarLayoutStrategyCentered;
tabBarController.itemPadding = 10.f;
tabBarController.showsItemHighlight = NO;
tabBarController.tintColor = [UIColor redColor];
tabBarController.viewControllers = viewController;
self.window.rootViewController = tabBarController;
Just have a look at the provided Demo-Application and the header files to see what's possible.
NGTabBarController was created by Matthias Tretter (@myell0w).
NGTabBarController is available under the MIT license. See the LICENSE file for more info. For usage without attribution contact NOUSguide.