init(from:)
Converts a mass formatter enumeration value into a corresponding HealthKit unit object.
Declaration
convenience init(from massFormatterUnit: MassFormatter.Unit)Parameters
- massFormatterUnit:
A valid mass formatter unit value. For a list of possible mass formatter unit values, see Unit.
Return Value
A HealthKit unit object, or nil if the unit parameter is not a valid energy formatter unit value.