I have a pinView in my mapView in Swift but when my mapView load this is showed in the center of mapView. I want know how can display this map moved to show the location and pin in other position, not center.
I'm trying do this with centerOffset annd calloutOffset property, but I don't get that I want
func mapView (mapView: MKMapView!,
viewForAnnotation annotation: MKAnnotation!) -> MKAnnotationView! {
var pinView:MKPinAnnotationView = MKPinAnnotationView()
pinView.annotation = annotation
pinView.calloutOffset = CGPointMake(50, 0);
pinView.pinColor = MKPinAnnotationColor.Green
pinView.animatesDrop = true
pinView.canShowCallout = true
return pinView
}
How can I do this?
Edit: I add this image for show that I want do and ask if is this possible..
Showing in center:
Showing pin in other position:
Thanks!