title: Referencing the Objective-C selector of a method
body: <p>As of Swift 2.2, the following code gives the warning:</p>
  
  <blockquote>
    <p>No method declared with Objective-C selector'sync'</p>
  </blockquote>
  
  <pre><code>if let tabBarController = segue.destinationViewController as? TabBarController {
    tabBarController.navigationItem.rightBarButtonItem = 
      UIBarButtonItem(title: "Upload", 
                      style: .Plain, 
                      target: tabBarController, 
                      action: "sync")
  </code></pre>
  
  <p>What should I replace <code>action: "sync"</code>it with to get rid of the warning?</p>
  
  <p>I've tried:</p>
  
  <pre><code>Selector("sync") // The Xcode provided fix which yields the same warning
  #selector(tabBarController.sync()) // Error: Argument of '#selector' does not refer to initializer or method 
  Selector(tabBarController.sync()) // No error/warning but doesn't fire sync function
  </code></pre>