CompassDirectionFormatter
public class CompassDirectionFormatter
The CompassDirectionFormatter class provides properly formatted
descriptions of absolute compass directions. For example, a value of 90 may
be formatted as “east”, depending on the locale.
-
See moreStyleis used to configure how aCompassDirectionFormattertranslates a compass direction into aString.Declaration
Swift
public enum Style : Hashable -
The
Styleused by this formatter. Defaults toStyle.long.Declaration
Swift
public var style: CompassDirectionFormatter.Style -
Creates a new
CompassDirectionFormatterinstanceDeclaration
Swift
public init() -
Returns a localized string describing the provided compass direction.
Declaration
Swift
public func string(from direction: CLLocationDirection) -> StringParameters
directionA compass direction, measured in degrees, where 0° means “due north” and 90° means “due east”.
Return Value
A localized
Stringdescribing the provideddirection
CompassDirectionFormatter Class Reference