Initializerswift 6.0.3Foundation
init
override init()
override init()
import Foundation
class MassFormatter
override init()
required init?(coder: NSCoder)
var isForPersonMassUse: Bool
var numberFormatter: NumberFormatter!
var unitStyle: Formatter.UnitStyle
func string(fromKilograms numberInKilograms: Double) -> String
func string(fromValue value: Double, unit: MassFormatter.Unit) -> String
func unitString(fromKilograms numberInKilograms: Double, usedUnit unitp: UnsafeMutablePointer<MassFormatter.Unit>?) -> String
func unitString(fromValue value: Double, unit: MassFormatter.Unit) -> String
func unitStringDisplayedAdjacent(toValue value: Double, unit: MassFormatter.Unit) -> String
Return the locale-appropriate unit to be shown adjacent to the given value. In most cases this will match unitStringDisplayedAdjacent(toValue:, unit:)
however there are a few special cases: - Imperial pounds with a short representation use “lb” in the abstract and “#” only when shown with a numeral. - Stones are are singular in the abstract and only plural when shown with a numeral.
enum Unit