title: How to add a "Continue" button to a top Navigation Bar in iOS/Swift
body: <p>(Xcode6, iOS8, iPhone, Swift)</p>
  
  <p>I would like to add a "Continue" button on the right of the navigation bar.</p>
  
  <p>How can this be accomplished? I've been trying with some of the methods available on UIBarButtonItem, but can't get it working.</p>
  
  <p>My best effort to date has been:</p>
  
  <pre><code>    var b = UIBarButtonItem(title: "Continue", style: UIBarButtonItemStyle, target: self, action: nil)
      self.navigationItem.rightBarButtonItem = b
  </code></pre>
  
  <p>But I'm getting an error on the first line. It doesn't like the "style" parameter. I've also tried</p>
  
  <pre><code>    var b = UIBarButtonItem(title: "Continue", style: UIBarButtonItemStylePlain, target: self, action: nil)
  </code></pre>
  
  <p>But no luck. Still stuck on the style parameter. Any ideas? tyvm Keith :D</p>
  
  <p>EDIT: For posterity, the following line also includes an <code>action</code> setting:</p>
  
  <pre><code>    var b = UIBarButtonItem(title: "Continue", style: .Plain, target: self, action:"sayHello")
  </code></pre>
  
  <p>Reference:
  <a href="https://stackoverflow.com/questions/24641350/how-to-set-the-action-for-a-uibarbuttonitem-in-swift">How to set the action for a UIBarButtonItem in Swift</a></p>