Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? {
  2.  
  3. if annotation is MKUserLocation {
  4. return nil
  5. }
  6.  
  7. var pinView = mapView.dequeueReusableAnnotationViewWithIdentifier(Constants.annotationPlace)
  8. if pinView == nil {
  9. pinView = MKAnnotationView(annotation: annotation, reuseIdentifier: Constants.annotationPlace)
  10. pinView!.canShowCallout = true
  11. pinView!.image = UIImage(named:Constants.imgPin)!
  12. }
  13. else {
  14. pinView!.annotation = annotation
  15. }
  16.  
  17. return pinView
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement