Type Method

unitFromEnergyFormatterUnit:

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

Declaration

+ (instancetype)unitFromEnergyFormatterUnit:(NSEnergyFormatterUnit)energyFormatterUnit;

Parameters

energyFormatterUnit

A valid energy formatter unit value. For a list of possible energy formatter unit values, see NSEnergyFormatterUnit.

Return Value

A HealthKit unit object, or nil if the unit parameter is not a valid energy formatter unit value.

See Also

Working with Formatter Units

+ energyFormatterUnitFromUnit:

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

+ 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.

+ 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.