title: How to pass block arguments through performSelector?
body: <p>Im trying to use <code>performSelector</code> method to dispatch function and pass a block as arguments.</p>
  <pre><code>import Foundation
  
  class SomeClass: NSObject {
      @objc func foo() {
          print(&quot;foo...&quot;)
          let selectorName = &quot;bar:&quot;
          let selector = Selector(selectorName)
          if self.responds(to: selector) {
              let block = { () in
                  print(&quot;block&quot;)
              }
              self.perform(selector, with: block) //this will crash
  //            self.bar(block) //this will be ok
          }
      }
      
      @objc func bar(_ arg1: @escaping ()-&gt;()) {
          print(&quot;bar...&quot;)
          arg1()
      }
  }
  
  let someClass = SomeClass()
  someClass.foo()
  </code></pre>
  <p><strong>As the sample code showed, It will crash  when use <code>self.perform(selector, with: block)</code>. And my question is how can i pass the block arguments through <code>performSelector</code> ?</strong></p>