During the localization of my app I went through a lot of documentation, somewhere Im sure I read that there is a way to get a set of units that is linked with the locale.>
Swift:
1.)
import MapKit
2.) Since creating formatter is expensive, you better set formatter as a lazy property. By doing so, you can initialize the formatter only when it's necessary and reuse the formatter rather than create a new one.
lazy var distanceFormatter: MKDistanceFormatter = {
var tempDistanceFormatter = MKDistanceFormatter()
tempDistanceFormatter.unitStyle = .Abbreviated // .abbreviated in Swift 3
return tempDistanceFormatter
}()
3.)
let distanceString = self.distanceFormatter.stringFromDistance(yourDistance)