Reputation: 38
On a map I have few pins. When I click on a pin I need to save it (name of pin + coordinate) to uitableview with core date and last click must be 1st.
I don't have an idea how can I do this :/
Can someone help me? please!
Upvotes: 0
Views: 413
Reputation: 1137
You are asking for a lot and have provided nothing. Here we expect you to try and then fail before asking for help. Try out the following and ask a more specific question if you run into trouble:
Implement the delegate method mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView). This will return the annotationView that is clicked. The annotation itself is a property on the view and the coordinate is a property on the annotation.
Flesh out your architecture. Save then update the table? Update the table while saving in the background? The saving and the table are two completely different components.
Check out this core data tutorial https://www.raywenderlich.com/115695/getting-started-with-core-data-tutorial
Good luck!!!
Upvotes: 3