Git Product home page Git Product logo

jjtabbarcontroller's Introduction

JJTabBarController

BuddyBuild

Create a TabBarController as it should be.

Support for iOS 6.0 and superior.

Current version: 1.0.0

####Functionality :

  • Personalize your TabBar.
  • Built-in transitions.
  • Choose the TabBar orientation.
  • Storyboard integration.
  • Easily add new actions for the TabBar with blocks.

####How to create

// import lib
#import "JJTabBarControllerLib.h"

// Create a controller 1
UIViewController *viewController1 = [[UIViewController alloc] initWithNibName:nil bundle:nil];
viewController1.jjTabBarButton = [UIButton buttonWithType:UIButtonTypeContactAdd];

// Create a controller 2
UIViewController *viewController2 = [[UIViewController alloc] initWithNibName:nil bundle:nil];
viewController2.jjTabBarButton = [UIButton buttonWithType:UIButtonTypeInfoDark];

// Add to tabbarController
_tabBarController = [[JJTabBarController alloc] initWithSize:CGSizeMake(88,44) andDockPosition:JJTabBarDockBottom];
_tabBarController.childViewControllers = @[ controller1, controller2];
[self addChildViewController:_tabBarController];
[self.view addSubview:_tabBarController.view];
[_tabBarController didMoveToParentViewController:self];

Download the project and see the example on how to do more advance features.

For cocoapods use:

pod 'JJTabBarController', '~> 1.0.0'

####Screenshots Screenshots

Screenshots

Screenshots

Screenshots

Screenshots

####More:

Suggestions and Contributions email: [email protected]

License: MIT License

jjtabbarcontroller's People

Contributors

joaofrjesusbe avatar

Stargazers

Matrix avatar nickcheng avatar rydensun avatar  avatar WiFi@憲有 avatar  avatar  avatar  avatar  avatar Sergey avatar Jason Duncan avatar Hanton Yang avatar Yuki Tamazawa avatar  avatar Favo Yang avatar Thiago Ramos avatar Shaffiulla Khan avatar Nattaphoom Chaipreecha avatar Sebastien Arbogast avatar  avatar Bob Edmonston avatar  avatar Keita Ojima avatar chitsung.lin avatar Chris Ladd avatar  avatar  avatar kk avatar arden avatar Kei Ishida avatar Paul Semionov avatar  avatar Austris avatar 0.7 avatar  avatar kevin avatar Michael Langford avatar Melih Buyukbayram avatar Tobrun avatar  avatar

Watchers

arden avatar mayulu avatar James Cloos avatar  avatar  avatar kiwi avatar  avatar  avatar

jjtabbarcontroller's Issues

Button image do not show on the tab bar buttons

Hi,
I set an image for all state in my button in the loaded XIB.
If I put a background image on background that's working but the image is streched (normal)
Here is the code to load the tab bar.
All is working except this image problem.

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    HomeViewController *home = [[HomeViewController alloc] init];
    BookViewController *book = [[BookViewController alloc] initWithBookData:[[DataManager sharedManager].books lastObject]];

    JJTabBarView *tabBarView = [[JJTabBarView alloc] initWithFrame:CGRectMake(0, 0, 88, 44)];
    tabBarView.backgroundColor = [UIColor blueColor];

    _tabBarController = [[JJTabBarController alloc] initWithTabBar:tabBarView andDockPosition:JJTabBarDockBottom];
    _tabBarController.delegate = self;
    _tabBarController.tabBarChilds = @[home, book];
    _tabBarController.selectedTabBarIndex = 0;
    [self addChildViewController:_tabBarController];
    [self.view addSubview:_tabBarController.view];
    [_tabBarController didMoveToParentViewController:self];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


#pragma mark - JTabBarControllerDelegate

- (UIButton *)tabBarController:(JJTabBarController *)tabBarController tabBarButtonForTabBarChild:(UIViewController *)childViewController forIndex:(NSInteger)index {
    return [[NSBundle mainBundle] loadNibNamed:@"BookButton" owner:self options:nil][0];
}

Thanks

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.