Instance Property

units

The measuring system (imperial or metric) to use for units.

Declaration

var units: MKDistanceFormatter.Units { get set }

Discussion

You can use this property to explicitly set the measuring system for units. The default value of this property is MKDistanceFormatter.Units.default, which bases the measuring system on the user’s locale.

See Also

Specifying the Format

var locale: Locale!

The locale to use when formatting strings.

enum MKDistanceFormatter.Units

Constants that reflect the type of units to use in the string.

enum MKDistanceFormatter.DistanceUnitStyle

Constants that indicate the format style to use for strings.