title: Showing custom Annotation View on MKMapView
body: <p>I am working on a map application. I am done with fetching locations on certain conditions, showing annotation on map view and displaying my custom callout bubble.</p>
  
  <p>My requirement is to display the annotation pin as follow:</p>
  
  <ul>
  <li>A Image with rounded corner to display annotation</li>
  <li>On the right top corner of the annotation there will be a red badge kind of view.</li>
  <li>Need to access that red badge view and set text in certain methods.</li>
  </ul>
  
  <p>Now I know I can set Image to the annotation view and make it rounded corner as follow:</p>
  
  <pre><code>pinView.image = [UIImage imageNamed:@"annotationImage"];
  [pinView.layer setCornerRadius:8.0];
  [pinView setClipsToBounds:YES];
  </code></pre>
  
  <p>Here <code>pinView</code> is an AnnotationView.</p>
  
  <p>Please let me know if I can create a custom view and assign it to pin view so I can get the red badge and set Image as well.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I tried lot more things and got succeed to put the view. But the problem is if I use a <code>MKAnnotationView</code> object on map I am not able to tap it or call gesture recognizer on it. If I use <code>MKPinAnnotationView</code> than I am able to call didSelected method or add a gesture recognizer but I am not able to set a Image on it as it is a Pin Annotation.
  Plz let me know if this is possible.</p>
  
  <p>Thanks in advance.</p>