9
Ho la seguente riga che funzionava in iOS 8 in Swift.Conversione [NSObject, AnyObject] in [String, AnyObject] in Swift
let placemark = placemarks![0] as? CLPlacemark
let destinationPlacemark = MKPlacemark(
coordinate: placemark!.location!.coordinate,
addressDictionary: placemark?.addressDictionary
)
ma ora mi dà la seguente eccezione:
Impossibile convertire il valore di tipo '[NSObject: ANYOBJECT]?' Attendere il tipo di argomento '[String: AnyObject]?'
Come posso farlo?
Prova a trasmettere 'segnaposto? .addressDictionary come? [String: AnyObject] ' – Leo
Questo ha fatto il trucco! Grazie mille :) –
Dal momento che funziona, invierò una risposta – Leo