A utility object that converts between a geographic distance and a string-based expression of that distance.
- iOS 7.0+
- macOS 10.9+
- tvOS 9.2+
- watchOS 2.0+
You use a distance formatter when you need to display distances to the user or when you want to parse user-specified text to obtain a numerical value for a distance. When formatting strings containing distances, a distance formatter object takes into account the user’s locale and language settings. You can also specify a custom locale or custom units for any distances that you format.