Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 51 lines (36 sloc) 2.642 kB
f666c60 @myell0w Updated Readme
myell0w authored
1 <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">
2
3 # NGTabBarController
4
5 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.
4abfef7 @myell0w Updated Readme
myell0w authored
6 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
7 to change the text colors, have image-only tabBar items etc.
f666c60 @myell0w Updated Readme
myell0w authored
8
9 ## Usage
10
11 ``` objective-c
12 NGColoredViewController *vc1 = [[NGColoredViewController alloc] initWithNibName:nil bundle:nil];
13 NGColoredViewController *vc2 = [[NGColoredViewController alloc] initWithNibName:nil bundle:nil];
14 NGColoredViewController *vc3 = [[NGColoredViewController alloc] initWithNibName:nil bundle:nil];
15 NGColoredViewController *vc4 = [[NGColoredViewController alloc] initWithNibName:nil bundle:nil];
16 NGColoredViewController *vc5 = [[NGColoredViewController alloc] initWithNibName:nil bundle:nil];
17
4abfef7 @myell0w Updated Readme
myell0w authored
18 vc1.ng_tabBarItem = [NGTabBarItem itemWithTitle:@"Home" image:image1];
19 vc2.ng_tabBarItem = [NGTabBarItem itemWithTitle:@"Images" image:image2];
20 vc3.ng_tabBarItem = [NGTabBarItem itemWithTitle:@"Live" image:image3];
21 vc4.ng_tabBarItem = [NGTabBarItem itemWithTitle:@"Contact" image:image4];
22 vc5.ng_tabBarItem = [NGTabBarItem itemWithTitle:@"Settings" image:image5];
f666c60 @myell0w Updated Readme
myell0w authored
23
24 NSArray *viewController = [NSArray arrayWithObjects:vc1,vc2,vc3,vc4,vc5,nil];
25
26 NGTabBarController *tabBarController = [[NGTestTabBarController alloc] initWithDelegate:self];
27
28 tabBarController.animation = NGTabBarControllerAnimationMoveAndScale;
4abfef7 @myell0w Updated Readme
myell0w authored
29 tabBarController.layoutStrategy = $isPhone() ? NGTabBarLayoutStrategyEvenlyDistributed : NGTabBarLayoutStrategyCentered;
30 tabBarController.itemPadding = 10.f;
31 tabBarController.showsItemHighlight = NO;
32 tabBarController.tintColor = [UIColor redColor];
f666c60 @myell0w Updated Readme
myell0w authored
33 tabBarController.viewControllers = viewController;
34 self.window.rootViewController = tabBarController;
35 ```
36
4abfef7 @myell0w Updated Readme
myell0w authored
37 Just have a look at the provided Demo-Application and the header files to see what's possible.
f666c60 @myell0w Updated Readme
myell0w authored
38
39 ## Credits
40
4abfef7 @myell0w Updated Readme
myell0w authored
41 NGTabBarController was created by [Matthias Tretter](https://github.com/myell0w/) ([@myell0w](http://twitter.com/myell0w)).
42
43 ## Images
44
45 ![Right Side](http://img.skitch.com/20120427-p14wrqtg2drbpn15exncxgyfbr.png "Right Side")
4c91ddf @myell0w New image for Readme
myell0w authored
46 ![Left Side](http://img.skitch.com/20120427-ctj4hqh5quh5k5r37a92m3u1h4.png "Left Side")
f666c60 @myell0w Updated Readme
myell0w authored
47
48 ## License
49
4abfef7 @myell0w Updated Readme
myell0w authored
50 NGTabBarController is available under the MIT license. See the LICENSE file for more info.
f666c60 @myell0w Updated Readme
myell0w authored
51 For usage without attribution contact [NOUSguide](mailto:info@nousguide.com).
Something went wrong with that request. Please try again.