how to localize address result from reverseGeocodeLocation?

前端 未结 4 1372
孤独总比滥情好
孤独总比滥情好 2021-01-31 09:55

My iphone app supposed to resolve address based on latitude and longitude of the user. reverseGeocodeLocation works fine, but results are in english.

Is there a way to l

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-31 10:22

    Since iOS11, apple provides us with another API which can set locale to print localized language.

    - (void)reverseGeocodeLocation:(CLLocation *)location preferredLocale:(nullable NSLocale *)locale
     completionHandler:(CLGeocodeCompletionHandler)completionHandler API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
    

提交回复
热议问题