Latest 1.0.2
License MIT
Platforms ios 8.0, requires ARC


  • A easy way to customize your tabBarController
  • Detail 简书

Adding MCTabBarController to your project


CocoaPods is the recommended way to add MCTabBarController to your project.

  • 1、Add a pod entry for MCTabBarController to your Podfile
  • 2、Install the pod(s) by running pod install.
  • 3、Include MCTabBarController wherever you need it with #import "MCTabBarController.h".
  • Object-C

    pod ‘MCTabBarController’

  • Swift

    pod ‘MCTabBarControllerSwift’

Source files

Alternatively you can directly add the folder MCTabBarController files to your project.

  • 1、Download the latest code version or add the repository as a git submodule to your git-tracked project.
  • 2、Open your project in Xcode, then drag and drop folder MCTabBarController onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.
  • 3、Include MCTabBarController wherever you need it with #import "MCTabBarController.h".


  • Xcode 8 or higher
  • iOS 8.0 or higher




Create your class inherits from the class MCTabBarController

#import "MCTabBarController.h"

@interface NormalTabBarController : MCTabBarController

@interface NormalTabBarController ()


@implementation NormalTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];

//    self.mcTabbar.tintColor = [UIColor colorWithRed:27.0/255.0 green:118.0/255.0 blue:208/255.0 alpha:1];
    self.mcTabbar.translucent = NO;
    self.mcTabbar.centerImage = [UIImage imageNamed:@"tab_unselect_gray"];
    self.mcTabbar.centerSelectedImage = [UIImage imageNamed:@"tab_select_blue"];
    // 可设置宽高
//    self.mcTabbar.centerWidth = 40;
//    self.mcTabbar.centerHeight = 40;
    [self addChildViewControllers];

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];


- (void)addChildViewControllers{
    [self addChildrenViewController:[[ViewController alloc] init] andTitle:@"首页" andImageName:@"tab1"];
    [self addChildrenViewController:[[ViewController alloc] init] andTitle:@"" andImageName:@""];
    [self addChildrenViewController:[[ViewController alloc] init] andTitle:@"发现" andImageName:@"tab3"];

- (void)addChildrenViewController:(UIViewController *)childVC andTitle:(NSString *)title andImageName:(NSString *)imageName{
    childVC.tabBarItem.image = [UIImage imageNamed:imageName];
    // 选中的颜色由tabbar的tintColor决定
    childVC.tabBarItem.selectedImage =  [UIImage imageNamed:imageName];
    childVC.title = title;

    BaseNavigationController *baseNav = [[BaseNavigationController alloc] initWithRootViewController:childVC];
    [self addChildViewController:baseNav];

//... something


This code is distributed under the terms and conditions of the MIT license.


如果你发现bug,please pull reqeust me,如果你觉得对你有所帮助,请给个star吧🌟。

Latest podspec

    "name": "MCTabBarControllerSwift",
    "version": "1.0.2",
    "summary": "A easy way to customize your tabBarController",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Ccalary": "[email protected]"
    "platforms": {
        "ios": "8.0"
    "source": {
        "git": "",
        "tag": "1.0.2"
    "source_files": "MCTabBarControllerSwift/MCTabBarSwift/**/*",
    "requires_arc": true,
    "swift_version": "4.1"

Pin It on Pinterest

Share This