init(width:locale:usage:hidesScaleName:numberFormatStyle:)
Creates an instance using the provided width, locale, usage type, number format, and the option to hide the unit name.
Declaration
init(width: Measurement<UnitType>.FormatStyle.UnitWidth = .abbreviated, locale: Locale = .autoupdatingCurrent, usage: MeasurementFormatUnitUsage<UnitType> = .general, hidesScaleName: Bool = false, numberFormatStyle: FloatingPointFormatStyle<Double>? = nil)Parameters
- width:
The width of the measurement unit.
- locale:
The locale to use when formatting the measurement.
- usage:
The intended purpose of the formatted measurement.
- hidesScaleName:
An option to hide the unit name of a measurement.
- numberFormatStyle:
The presentation style of the numeric value.