Constants that indicate the format style to use for strings.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.2+
- watchOS 2.0+
Framework
- Map
Kit
Declaration
enum DistanceUnitStyle : UInt
Constants that indicate the format style to use for strings.
SDKs
Framework
enum DistanceUnitStyle : UInt
case `default`
The decision to abbreviate is based on the current locale and user language settings.
case abbreviated
Use abbreviated units. For example, use the abbreviation km
instead of kilometer
.
case full
Spell out units in full. For example, use kilometer
instead of the abbreviation km
.
var locale: Locale!
The locale to use when formatting strings.
var units: MKDistance Formatter .Units
The measuring system (imperial or metric) to use for units.
enum MKDistance Formatter .Units
Constants that reflect the type of units to use in the string.
var unit Style: MKDistance Formatter .Distance Unit Style
The preferred style for units.