我使用CoreLocation获取user's location
并尝试将该位置存储在String
func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
if let location = locations.first {
currentLoc = location // Set location to currentLoc string
print("Current location: \(location)")
} else {
// ...
}
}
问题:如何将CLLocation
类型转换为String
?