MirrorJacket123
MirrorJacket123

Reputation: 432

Remove MKPointAnnotation 3D effect (make flat colour)

I am trying to remove the 3D effect on an MKPointAnnotation.

This is my marker with the 3D effect (or shadow)

Marker with gradient

This is a flat colour marker (picture from the internet)

Marker without gradient

I assume that you can change this somewhere in this function, which I have been able to successfully change the color of the marker

func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
    let annotationView = MKMarkerAnnotationView(annotation: annotation, reuseIdentifier: "MyMarker")
    annotationView.markerTintColor = UIColor.blue
    return annotationView
}

Marker with colour

Does anyone know how to make the colour flat and remove the 3D effect?

Upvotes: 4

Views: 229

Answers (0)

Related Questions