Skip to content
Updating UINavigationController's appearance more easily.
Objective-C Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
DoubleNavigationController [fix] navigation bar ui Apr 12, 2019
Resource [chore] picture design Apr 12, 2019
.gitignore initial commit Nov 13, 2018
.travis.yml Initial commit Nov 12, 2018
LICENSE Initial commit Nov 12, 2018 [chore] readme Apr 12, 2019


Platform Version License MIT Gmail



As we all known, UINavigationController is a container view controller that manages one or more child view controllers in a navigation interface. Sometimes, we just wanna update the appearance in current view controller instead of affecting the whole app. DoubleNavigationController is a library that can solve the problem above.


We can think of UINavigationController as a tree, and each node is a ViewController that managed by it. By using DoubleNavigationController, we can update the appearance of NavigationBar in current node without affecting its parent node's. However, its child nodes' NavigationBar will be affected. The relationship can be described as the picture below.



To run the example project, clone the repo, and run pod install from the Example directory first.



You can customize your navigation by implementing dbn_configNavigationController: in your ViewVontroller.

- (void)dbn_configNavigationController:(UINavigationController *)navigationController {
    [navigationController setNavigationBarHidden:NO animated:NO];
    navigationController.navigationBar.barTintColor = [UIColor whiteColor];
    navigationController.navigationBar.tintColor = [UIColor purpleColor];
    navigationController.navigationBar.titleTextAttributes = @{NSFontAttributeName: [UIFont systemFontOfSize:20], NSForegroundColorAttributeName: [UIColor redColor]};

- (void)dbn_configNavigationItem:(UINavigationItem *)navigationItem {
    UIBarButtonItem *btnItem = [[UIBarButtonItem alloc] initWithTitle:@"Next" style:UIBarButtonItemStylePlain target:self action:@selector(eventFromButton:)];
    navigationItem.rightBarButtonItem = btnItem;
    navigationItem.title = @"Hello";

You can also update the appearance of your app's navigation at any time by using dbn_performBatchUpdates: in the category of UIViewController.

[self dbn_performBatchUpdates:^(UINavigationController * _Nullable navigationController) {
    if (navigationController) {
        navigationController.navigationBar.tintColor = [UIColor purpleColor];


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

source ''
platform :ios, '8.0'

target 'TargetName' do
pod 'DoubleNavigationController'


DoubleNavigationController is available under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.