Hello everyone,
I want to use a map view to display an annotation but when I place it on the view it always stays in at the center of the map view.
I want to give it some offset so that it goes a little bit upwards.
This is the code I have so far. Could you please help me?
Thank you for your help.
I want to use a map view to display an annotation but when I place it on the view it always stays in at the center of the map view.
I want to give it some offset so that it goes a little bit upwards.
This is the code I have so far. Could you please help me?
Code Block let span = MKCoordinateSpan(latitudeDelta: CLLOcationDegrees, longitudeDelta: CLLOcationDegrees) let region = MKCoordinateRegion(center: observationCoordinates, span: span) let annotation = MKPointAnnotation() annotation.coordinate = observationCoordinates uiView.setRegion(region, animated: true) uiView.addAnnotation(annotation)
Thank you for your help.