DistanceFormatter
public class DistanceFormatter: LengthFormatter
Provides appropriately formatted, localized descriptions of linear distances.
-
Intializes a new
DistanceFormatter.Declaration
Swift
public init(approximate: Bool = false)Parameters
approximateapproximates the distances.
-
Returns a more human readable
Stringfrom a givenCLLocationDistance.The user’s
Localeis used here to set the units.Declaration
Swift
public func string(from distance: CLLocationDistance) -> String
Install in Dash
DistanceFormatter Class Reference