-1
ユーザーの状態を取得するにはどうすればよいですか?ユーザーの状態を取得する方法
マイコード:
let geoCoder = CLGeocoder()
geoCoder.reverseGeocodeLocation(currentUserLocation) { (placemarks, error) -> Void in
if error != nil {
print("Error getting location: \(error)")
} else {
let placeArray = placemarks as [CLPlacemark]!
var placeMark: CLPlacemark!
placeMark = placeArray?[0]
let result = placeMark.addressDictionary
let cityName = result?["City"] as! String
print(cityName)
}
}
try: 'let stateName = result?[" State "] as?文字列{} ' –