Kann nicht Optional () string @ loswerd
Ich versuche, den Standort des Benutzers auf dem Server zu aktualisieren
Mit dieser Funktion
func updateloc(lat : String?, long : String?) {
/code...
let data = "lat=\(lat!)&long=\(long!)"
}
nd hier ist der Delegier
func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
updateloc(String(manager.location?.coordinate.latitude), long: String(manager.location?.coordinate.longitude))
}
Ich habe Optional ("") fürlat
undlong
Variablen und kann es nicht loswerden.
Ich habe eine Idee, wie das geht?