title: Reloading a UINavigationItem
body: <p>I want to load my view controller with one <code>navItem.rightBarButtonItem</code> and change it to another based on a set of circumstances. It seems as if I can only load it once, on <code>viewDidLoad</code>. Is there a method for updating a bar button item after you've changed the icon?</p>
  
  <pre><code>func viewDidLoad() {
      var iconOne = UIImage(named: "button")
      let buttonOne = UIBarButtonItem(image: iconOne, style: UIBarButtonItemStyle.Plain, target: self, action: "funcOne")
      self.navItem.rightBarButtonItem = buttonOne
  
      //perform async query, if a condition holds true then:
  
      var iconTwo = UIImage(named: "buttonTwo")
      let buttonTwo = UIBarButtonItem(image: iconTwo, style: UIBarButtonItemStyle.Plain, target: self, action: "funcTwo")
      self.navItem.rightBarButtonItem = buttonTwo
  }
  </code></pre>
  
  <p>Full code:</p>
  
  <pre><code>override func viewDidLoad() {
          super.viewDidLoad()
  
  
          // Sets custom nav bar view so we can add multiple bar buttons
          navBar = UINavigationBar(frame: CGRectMake(0, 20, UIScreen.mainScreen().bounds.size.width, 44))
          navBar.barTintColor = UIColor.blackColor() // Sets bar to black
          navBar.translucent = false
          self.view.addSubview(navBar)
          navItem = UINavigationItem(title: "\(name)") // Sets title
          navBar.titleTextAttributes = [ NSFontAttributeName: UIFont(name: "Helvetica Neue", size: 25)!,  NSForegroundColorAttributeName: UIColor.whiteColor()]
  // Set icons
              var backIcon = UIImage(named: "backButton")
              let backButton = UIBarButtonItem(image: backIcon, style: UIBarButtonItemStyle.Plain, target: self, action: "backButton")
              navItem.leftBarButtonItem = backButton
  
              var userQuery = PFQuery(className: "Followers")
              userQuery.whereKey("following", equalTo: username)
              userQuery.findObjectsInBackgroundWithBlock({ (objects, error) -&gt; Void in
                  if error == nil {
  
                      if let objects = objects {
  
                          for object in objects {
  
                              if let follower = object["follower"] as? String {
                                  if follower == PFUser.currentUser()!.username! {
                                      var followingIcon = UIImage(named: "followingButton")
                                      let followingButton = UIBarButtonItem(image: followingIcon, style: UIBarButtonItemStyle.Plain, target: self, action: "unfollowUser")
                                      self.navItem.rightBarButtonItem = followingButton
  
                                      self.navItem.rightBarButtonItem?.tintColor = UIColor.orangeColor()
                                  } else {
  
                                      var followIcon = UIImage(named: "followButton")
                                      let followButton = UIBarButtonItem(image: followIcon, style: UIBarButtonItemStyle.Plain, target: self, action: "followUser")
                                      self.navItem.rightBarButtonItem = followButton
  
  
                                      self.navItem.rightBarButtonItem?.tintColor = UIColor.darkGrayColor()
                                  }
                              }
                          }
  
                      }
                  } else {
                      println(error)
                  }
              })
  </code></pre>