title: compare sender: Any? to UIBarButtonItem
body: <p>I am new to swift, and just happen to have Swift 3 released, but apple document still using Swift2 syntax.</p>
  
  <p>Understand that below  (Swift2)</p>
  
  <pre><code>@IBOutlet var weak saveButton:UIBarButtonItem!
  </code></pre>
  
  <p>This method lets you configure a <code>ViewController</code> before it's presented.</p>
  
  <pre><code>override func prepareForSegue(segue: UIStoryboardSegue, sender:AnyObject?) {
  if saveButton === sender {   //originally swift 2 can compare
  
  }
  </code></pre>
  
  <p>Has changed to (Swift3)</p>
  
  <pre><code>override func prepare(for segue: UIStoryboardSegue, sender:Any){
  }
  </code></pre>
  
  <p>Now on swift 3 I cannot check <code>if sender = saveButton</code></p>
  
  <p>I am very new to Swift, is that I need to cast it like <code>sender as UIBarButtonItem?</code></p>
  
  <p><a href="https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson8.html#//apple_ref/doc/uid/TP40015214-CH16-SW1" rel="nofollow">Original Apple Guide</a></p>