Speichern Sie CLLocationCoordinate2D in NSUserDefaults

Ich bin neu in der iPhone-Entwicklung, und ich möchte speichernCLLocationCoordinate2D Einspruch erhebenNSUserDefaults. Ich versuche

    [defaults setObject:location forKey:@"userLocation"];

Aber es gibt einen Fehler'CLLocationCoordinate2D an Parameter mit inkompatibler Typ-ID senden'

So, wie man speichertCLLocationCoordinate2D inNSUserDefaults? Vielen Dank.

Antworten auf die Frage(6)

Ihre Antwort auf die Frage