Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? {
- if annotation is MKUserLocation {
- return nil
- }
- var pinView = mapView.dequeueReusableAnnotationViewWithIdentifier(Constants.annotationPlace)
- if pinView == nil {
- pinView = MKAnnotationView(annotation: annotation, reuseIdentifier: Constants.annotationPlace)
- pinView!.canShowCallout = true
- pinView!.image = UIImage(named:Constants.imgPin)!
- }
- else {
- pinView!.annotation = annotation
- }
- return pinView
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement