Type Method

massFormatterUnitFromUnit:

Converts a HealthKit unit object into a corresponding mass formatter enumeration value.

Declaration

+ (NSMassFormatterUnit)massFormatterUnitFromUnit:(HKUnit *)unit;

Parameters

unit

A valid HealthKit unit object. If the unit is not a mass-type unit, this method throws an exception (NSInvalidArgumentException).

Return Value

A mass formatter unit value. For a list of possible mass formatter unit values, see NSMassFormatterUnit.

See Also

Working with Formatter Units

+ energyFormatterUnitFromUnit:

Converts a HealthKit unit object into a corresponding energy formatter enumeration value.

+ unitFromEnergyFormatterUnit:

Converts an energy formatter enumeration value into a corresponding HealthKit unit object.

+ lengthFormatterUnitFromUnit:

Converts a HealthKit unit object into a corresponding length formatter enumeration value.

+ unitFromLengthFormatterUnit:

Converts a length formatter enumeration value into a corresponding HealthKit object.

+ unitFromMassFormatterUnit:

Converts a mass formatter enumeration value into a corresponding HealthKit unit object.