0

I wonder if Swift supports any faster way to do that without implementing arythmetics. I guess adjusting the map span to let user see all the annotation pins is not a rare problem.

I found this: Zooming MKMapView to fit annotation pins? but it's a bit complicated in objective-c and seems to be a vulnerable solution. Did swift developers find any other way(or method) to deal with it?

Thanks in advance

Community
  • 1
  • 1
theDC
  • 6,364
  • 10
  • 56
  • 98

1 Answers1

2

If you can target iOS 7 or above, you can use showAnnotations:animated, and pass in the map view's annotation property.

Dominic K
  • 6,975
  • 11
  • 53
  • 62