How do I save on Parse a MKPointAnnotation
that I created?
@IBAction func salvaRicordo(sender: AnyObject) {
let puntoRicordo = MKPointAnnotation()
puntoRicordo.coordinate = posizioneUtente
puntoRicordo.title = nomeField.text
puntoRicordo.subtitle = descrizioneField.text
self.myMapView.addAnnotation(puntoRicordo)
print("PointAnnotation creato")
puntoRicordo.saveInBackgroundWithBlock {
(success: Bool, error: NSError?) -> Void in
if (success) {
// The object has been saved.
} else {
// There was a problem, check error.description
}
}