title: Set BarButtonItem directly from navigation controller
body: <p>I have navigation controller with one rootViewController called "LoginController". When I try to add rightBarButtonItem from init of LoginController so it works, but directly in navigation controller same operation does not works.</p>
  
  <p>This works:</p>
  
  <pre><code>class LoginController: UIViewController {
  
      init(){
          super.init(nibName: nil, bundle: nil)
  
          let button = UIBarButtonItem()
          button.title = "Test2"
          navigationItem.rightBarButtonItem = button        
      }
  
      ......
  
  }
  </code></pre>
  
  <p>This doesn't work:</p>
  
  <pre><code>class MainNavigationController : UINavigationController{
  
      private var _distributionProvider : DistributionProvider!
  
      init(rootViewController: UIViewController, distributionProvider : DistributionProvider) {
          _distributionProvider = distributionProvider
          super.init(rootViewController: rootViewController)
  
          navigationBar.barTintColor = UIColor(red: 90/255, green: 177/255, blue: 225/255, alpha: 1)
  
          let button = UIBarButtonItem()
          button.title = "Test"
          navigationItem.rightBarButtonItem = button
  
  
      }
  
  
     .... 
  }
  </code></pre>
  
  <p>Where is problem? Thanks</p>