puuurm / swift-weatherforecast

iOS app
1 stars 0 forks source link

MKErrorDomain error 4 #3

Closed puuurm closed 6 years ago

puuurm commented 6 years ago

장소 검색 중 발생 (캘리포니아)

let selectedCityName = filterdCities[indexPath.row]
let request = MKLocalSearchRequest()
request.naturalLanguageQuery = selectedCityName.title
MKLocalSearch(request: request).start { [weak self] (response, error) in
          if let error = error { print(error.localizedDescription) }
          guard let mapItem = response?.mapItems.first else { return }
          let coordinate = mapItem.placemark.coordinate
          History.shared.requestWeather(coordinate)
          self?.dismissKeyboard()
          self?.dismiss(animated: true, completion: nil)
}