title: Is it possible to pass closure into selector?
body: <p>Is it possible in swift, passing a closure into selector?</p>
  <p>for example, Is it possible to rewrite this code:</p>
  <pre><code>let doneButton = UIBarButtonItem(title: &quot;Done&quot;, style: .done, target: self, action: #selector(doneAction(_:)))
      
  @objc func doneAction(_ sender: UIBarButtonItem){
      self.myTextField?.resignFirstResponder()
  }
  </code></pre>
  <p>to be:</p>
  <pre><code>let doneButton = UIBarButtonItem(title: &quot;Done&quot;, style: .done, target: self, action: { _ sender in 
      self.myTextField?.resignFirstResponder()
  })
  </code></pre>
  <p>I've tried the above code and got:</p>
  <pre><code>Cannot convert value of type '() -&gt; ()' to expected argument type 'Selector'
  </code></pre>