Selector syntax for swift 3.0
<p>I am trying to add target into button this way:</p>

<pre><code>btnAll.addTarget(self, action: #selector(buttonTapped(_:)), for: .touchUpInside)
</code></pre>

<p>But it is giving me an error:</p>

<blockquote>
  <p>Use of unresolved identifier 'buttonTapped'</p>
</blockquote>

<p>But I declared function like:</p>

<pre><code>func buttonTapped(sender: UIButton) {

    print("All Tapped")
}
</code></pre>

<p>Can anybody tell me what is the correct way to do this in swift 3.</p>