Swift - Generate an Address Format from Reverse Geocoding

前端 未结 10 1400
难免孤独
难免孤独 2021-01-31 03:46

I am trying to generate a Formatted Full address using CLGeocoder in Swift 3. I referred to this SO thread to get the code given below.

However, sometimes the app crashe

10条回答
  •  后悔当初
    2021-01-31 04:42

    To concatenate you can simply replace return address by this :

    return "\(locationName), \(street), \(city), \(zip), \(country)"
    

提交回复
热议问题