Latest 0.1
Homepage https://github.com/zingwin/ZLTabBarController
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

TabBarController with animation

ZLTabBarController is simple and high custom tabBarController

use animation TabBarController

demo1

normal TabBarController

demo1

Usage

To run the example project, you can download from git

Installation

ZLTabBarController is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'ZLTabBarController'

core use code, in AppDelegate.m

-(void)setupViewControllers{
    UIViewController *firstViewController = [[FirstViewController alloc] init];
    UIViewController *firstNavigationController = [[UINavigationController alloc]
                                                   initWithRootViewController:firstViewController];

    UIViewController *secondViewController = [[SecondViewController alloc] init];
    UIViewController *secondNavigationController = [[UINavigationController alloc]
                                                    initWithRootViewController:secondViewController];

    UIViewController *thirdViewController = [[ThirdViewController alloc] init];
    UIViewController *thirdNavigationController = [[UINavigationController alloc]
                                                   initWithRootViewController:thirdViewController];

    ZLTabBarController *tabBarController = [[ZLTabBarController alloc] init];
    [tabBarController setViewControllers:@[firstNavigationController, secondNavigationController,
                                           thirdNavigationController]];

    [self.window setRootViewController:tabBarController];

    [self customizeTabBarForController:tabBarController];
}

- (void)customizeTabBarForController:(ZLTabBarController *)tabBarController {

    NSArray *tn = @[@"tab_add_nor", @"tab_home_nor", @"tab_user_nor"];
    NSArray *ta = @[@"tab_add_act", @"tab_home_act", @"tab_user_act"];

    [tabBarController tabBar].backgroundColor = [UIColor blackColor];

    [tabBarController tabBar].isShowStrokeAnimaiton = YES;
    [tabBarController tabBar].barItemLineWidth  = 1.0f;
    [tabBarController tabBar].barItemStrokeColor = UIColorFromHEX(0xEC584E);// [UIColor colorWithHex:0xEC584E];

    NSInteger index = 0;
    for (ZLTabBarItem *item in [[tabBarController tabBar] items]) {
        [item setFinishedSelectedImage:[UIImage imageNamed:ta[index]] withFinishedUnselectedImage:[UIImage imageNamed:tn[index]]];
        index++;
    }
}

Latest podspec

{
    "name": "ZLTabBarController",
    "version": "0.1",
    "summary": "custom tabbarcontroller",
    "homepage": "https://github.com/zingwin/ZLTabBarController",
    "license": "MIT",
    "authors": {
        "zwin": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/zingwin/ZLTabBarController.git",
        "tag": "0.1"
    },
    "frameworks": "UIKit",
    "source_files": [
        "Classes",
        "**/Classes/*.{h,m}"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This