Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Build Status

MZNavTab is an iOS library, it can help you combine UITabBar and UINavigationController.


MZNavTab is a flexible and convenient iOS library to help you combine UITabBarController(It's UITabBar actually, or just a custom view which work like a tab bar) and UINavigationController. As an iOS developer, you may know that it's much more complex to combine UITabBarController and UINavigationController in your app, mostly we want to control the visibility of tab bar while we make a push or pop in navigation controller.

Screenshot of MZNavTab Example

How to run examples

  1. Clone the repository Optionally you can fork the repository and clone it from your own github account, this approach would be better in case you want to contribute.
  2. Open MZNavTabSample/MZNavTabSample.xcodeproj and run the project. Enjoy!

How to use

The simplest way to use MZNavTab is creating an instance of class MZTabViewController with initialization - (instancetype)initWithTabBarItems:(NSArray *)tabBarItems itemViewControllers:(NSArray *)itemViewControllers:

#import "MZTabViewController.h"
UITabBarItem * item1 = [[UITabBarItem alloc] initWithTitle:@"Tab1" image:[UIImage imageNamed:@"ico_tab_1"] tag:1];
UITabBarItem * item2 = [[UITabBarItem alloc] initWithTitle:@"Tab1" image:[UIImage imageNamed:@"ico_tab_2"] tag:2];

UIViewController * viewController1 = [[UIViewController alloc] init];
UIViewController * viewController2 = [[UIViewController alloc] init];
MZTabViewController * tabViewController = [[MZTabViewController alloc] initWithTabBarItems:@[item1, item2] itemViewControllers:@[viewController1, viewController2]];

MZNavTab is flexble, so you can use it in these ways:

  1. Subclass MZTabViewController and build your tab bar
  2. Build your tab controller instead of using MZTabViewController and using MZNavTabItemController in your tab controller (Read the code in MZTabViewController, you will know how to use it).


The easiest way to use MZNavTab in your app is via CocoaPods.

  1. Add the following line in the project's Podfile file: pod 'MZNavTab'.
  2. Run the command pod install from the Podfile folder directory.

Or, you can clone the repository, and copy the source files in folder MZNavTab to your project's folder, then drag and drop them onto your project in xcode.


  • ARC
  • iOS 7.0 and above


MZNavTab is an iOS library, it can help you combine UITabBar and UINavigationController.







No packages published