How can I center my mapview so that the selected pin is not in the middle of the map but in 1/3 of it?
问题 I have coordinates of a single pin on my map. I try to center my map on that pin, but I don't want to keep the pin directly in the middle of the map, but in 1/3 of the screen. I tried to do it in the following workaround: let coordinateRegion = MKCoordinateRegionMakeWithDistance(coordinatesOfThePin, 500, 500) mapView.setRegion(coordinateRegion, animated: true) let frame = mapView.frame let myPoint = CGPointMake(frame.midX, frame.midY/3) let myCoordinate = mapView.convertPoint(myPoint,