title: Swift wants argument of #selector to be exposed to Objective-C
body: <p>I have a Swift project where I want to attach a method to a UIButton's tap event. I have the following code:</p>
  
  <pre><code>class MyClass {
    let myButton = UIButton(frame: CGRectMake(50, 50, 100, 50))
    init() {
      myButton.addTarget(self, #selector(self.didTap(_:)), forControlEvents: .TouchUpInside)
    }
  
    func didTap(sender: UIButton) {
      print("Tapped")
    }
  }
  </code></pre>
  
  <p>XCode highlights my <code>addTarget</code> line and says:</p>
  
  <pre><code>Argument of '#selector' refers to a method that is not exposed to Objective-C
  </code></pre>
  
  <p>If I add the <code>@objc</code> prefix to my <code>func didTap</code> like it suggests then everything works fine.</p>
  
  <p>Do I have something enabled in my build settings which is causing this strange behaviour?</p>
  
  <p>PS. I get this behaviour in 7.3.1. But if I try this in 7.2.1 it doesn't accept the <code>#selector(method(_:))</code> syntax, and <code>Selector("method:")</code> works fine.</p>