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


enum Units : UInt



case `default`

The format uses the locale information to determine which units to use. Some locales mix metric and imperial units so do not assume this means one or the other.

case metric

The format uses metric units.

case imperial

The format uses imperial units.

case imperialWithYards

The format uses imperial units that include measurements in yards.

See Also

Specifying the Format

var locale: Locale!

The locale to use when formatting strings.

var units: MKDistanceFormatter.Units

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

enum MKDistanceFormatter.DistanceUnitStyle

Constants that indicate the format style to use for strings.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software