How to catch the click on the button in added XIB view (annotation)
<p>1) I have the ViewController with the MapKit</p>

<p>1.1) I have added some pin's to Map</p>

<pre><code>class ViewController: UIViewController, MKMapViewDelegate
</code></pre>

<p>2) I write the new classes for custom pin Callout and Annotation</p>

<pre><code>class CustomPointAnnotation: MKPointAnnotation {

class CustomCalloutView: UIView {
</code></pre>

<p>3) I haved created .xib for my custom pin callout
<a href="https://i.stack.imgur.com/eEYbR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eEYbR.png" alt="enter image description here"></a></p>

<p>4) I created the button in my .xib, this button must do something, for example</p>

<pre><code>    @IBAction func clickTest(sender: AnyObject) {
    print("aaaaa")
}
</code></pre>

<p>5) This button doesn't work</p>

<p>What is usually practice for this? I want to make my button working.
Button is blue:
<a href="https://i.stack.imgur.com/1cR9S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1cR9S.png" alt="enter image description here"></a></p>

<p>All project you can see on Github: <a href="https://github.com/genFollowMe1/forStack" rel="nofollow noreferrer">https://github.com/genFollowMe1/forStack</a>
Thank you, sorry for English )</p>