Type Method

lengthFormatterUnitFromUnit:

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

Declaration

+ (NSLengthFormatterUnit)lengthFormatterUnitFromUnit:(HKUnit *)unit;

Parameters

unit

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

Return Value

A length formatter unit value. For a list of possible length formatter unit values see NSLengthFormatterUnit.

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.

+ unitFromLengthFormatterUnit:

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

+ massFormatterUnitFromUnit:

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

+ unitFromMassFormatterUnit:

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