Git Product home page Git Product logo

ngtabbarcontroller's Introduction

<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">

NGTabBarController

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.

Usage

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.

Credits

NGTabBarController was created by Matthias Tretter (@myell0w).

Images

Right Side Left Side

License

NGTabBarController is available under the MIT license. See the LICENSE file for more info. For usage without attribution contact NOUSguide.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.