         return UIColor(red: red, green: green, blue: blue, alpha: 1)
     }
 
+    override func prefersNavigationBarHidden() -> Bool {
+        return true
+    }
+
 }
+
+class BarViewController: ViewController {
+
+    override func hasCustomNavigationBar() -> Bool {
+        return true
+    }
+
+}

import UIKit
import UIViewController_NavigationBar

final class ViewController: UIViewController {

    let button = UIButton(type: .System)


        let index = self.navigationController?.viewControllers.count ?? 1
        let configuration = configurations[index % configurations.count]

        let viewController = BarViewController()
        viewController.navigationItem.title = "ViewController \(index)"
        if configuration.hasNavigationBackground {
            viewController.navigationBar.setBackgroundImage(nil, forBarMetrics: .Default)
