Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Tap to set location
- @IBAction func mapPoint(_ sender: UITapGestureRecognizer) {
- // Retrieve coordinates
- let location = sender.location(in: self.mapView)
- let locCoord = self.mapView.convert(location, toCoordinateFrom: self.mapView)
- // Create pin
- let annotation = MKPointAnnotation()
- annotation.coordinate = locCoord
- annotation.title = "Meeting Point"
- self.mapView.addAnnotation(annotation)
- }
Add Comment
Please, Sign In to add comment