title: swift - UINavigationController extension not working
body: <p>I'm going to be using similar properties on all of my navigation controllers in the different view controllers with the exception of some navigation items and obviously the titles.</p>
  
  <p>I made an extension planning to be able to call it and have my defaults set; however, it doesn't do anything. The code does work when I simply place it in the actual class but not when I call the SetDefaults.</p>
  
  <p><strong>Extensions</strong>:</p>
  
  <pre><code>extension UINavigationController {
      func setDefaults(titleText: String){
          let appDel = UIApplication.sharedApplication().delegate as! AppDelegate
  
          //Set title label
          let label = UILabel()
          label.font = UIFont(name: appDel.regularDefaultFont, size: 16)
          label.text = titleText
          label.kern(1.0)
          label.sizeToFit()
          self.navigationItem.titleView = label
  
          //Set white background tint color
          self.navigationBar.barTintColor = UIColor.whiteColor()
  
          //Set navigation bar bottom line
          let bottomBorderRect = CGRect(x: 0, y: UIScreen.mainScreen().bounds.height, width: UIScreen.mainScreen().bounds.width, height: 1)
          let bottomBorderView = UIView(frame: bottomBorderRect)
          bottomBorderView.backgroundColor = UIColor(r: 250, g: 250, b: 250)
          self.navigationBar.addSubview(bottomBorderView)
      }
  }
  </code></pre>
  
  <p>Call to SetDefaults from class with a navigationcontroller:</p>
  
  <pre><code>self.navigationController.SetDefaults("Login")
  </code></pre>