Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 443446f5c4
Fetching contributors…

Cannot retrieve contributors at this time

55 lines (43 sloc) 1.91 kb
//
// NGTestTabBarController.m
// NGVerticalTabBarControllerDemo
//
// Created by Tretter Matthias on 24.04.12.
// Copyright (c) 2012 NOUS Wissensmanagement GmbH. All rights reserved.
//
#import "NGTestTabBarController.h"
@interface NGTestTabBarController ()
- (void)setupForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
@end
@implementation NGTestTabBarController
- (id)initWithDelegate:(id<NGTabBarControllerDelegate>)delegate {
self = [super initWithDelegate:delegate];
if (self) {
self.animation = NGTabBarControllerAnimationMoveAndScale;
self.tabBar.tintColor = [UIColor colorWithRed:143.f/255.f green:39.f/255.f blue:47.f/255.f alpha:1.f];
self.tabBar.itemPadding = 10.f;
[self setupForInterfaceOrientation:[UIApplication sharedApplication].statusBarOrientation];
}
return self;
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
[self setupForInterfaceOrientation:toInterfaceOrientation];
}
////////////////////////////////////////////////////////////////////////
#pragma mark - Private
////////////////////////////////////////////////////////////////////////
- (void)setupForInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; {
if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) {
self.tabBarPosition = NGTabBarPositionBottom;
self.tabBar.drawItemHighlight = NO;
self.tabBar.layoutStrategy = NGTabBarLayoutStrategyCentered;
self.tabBar.drawGloss = YES;
} else {
self.tabBarPosition = NGTabBarPositionLeft;
self.tabBar.drawItemHighlight = YES;
self.tabBar.drawGloss = NO;
self.tabBar.layoutStrategy = NGTabBarLayoutStrategyStrungTogether;
}
}
@end
Jump to Line
Something went wrong with that request. Please try again.