No se puede eliminar "Opcional" de la cadena
Debajo está mi fragmento
// MARK: - Location Functions
func getCurrentLocation() -> (String!, String!) {
let location = LocationManager.sharedInstance.currentLocation?.coordinate
return (String(location?.latitude), String(location?.longitude))
}
func setCurrentLocation() {
let (latitude, longitude) = getCurrentLocation()
let location = "\(latitude!),\(longitude!)"
print(location)
}
Aunque desenvuelvo opcional usandolatitude!
ylongitude!
me imprimeOptional(37.33233141),Optional(-122.0312186)
Me estoy rompiendo la cabeza para eliminar el enlace opcional.