问题
I am using swift 4. I have added MKMapView with some pins but I need to resize the pin image based on the map zooming.
So if anyone knows, how to resize the image based on map zooming?
回答1:
You can't. Pins always say a constant size as the user zooms the map.
You'll want to look into using a MKOverlay
and possibly a custom MKOverlayRenderer
subclass. That will allow you to draw content that grows and shrinks as the user zooms in and out.
来源:https://stackoverflow.com/questions/52782144/how-to-resize-the-custom-annotation-pin-image-in-mkmapview