Type Method

literUnitWithMetricPrefix:

Returns a HealthKit unit for measuring volume, using liter units with the provided prefix.

Declaration

+ (instancetype)literUnitWithMetricPrefix:(HKMetricPrefix)prefix;

Parameters

prefix

A valid metric prefix value. For the complete list of prefix values, see HKMetricPrefix.

Return Value

A HealthKit unit for measuring volume based on liters and the provided prefix.

Discussion

This method is used to create prefixed versions of liters, typically milliliter units, as shown below.

HKUnit *ml = [HKUnit literUnitWithMetricPrefix:HKMetricPrefixMilli];

See Also

Constructing Volume Units

+ literUnit

Returns a HealthKit unit for measuring volume in liters.

+ fluidOunceUSUnit

Returns a HealthKit unit for measuring volume in US fluid ounces.

+ fluidOunceImperialUnit

Returns a HealthKit unit for measuring volume in imperial fluid ounces.

+ cupUSUnit

Returns a HealthKit unit for measuring volume in US cups.

+ cupImperialUnit

Returns a HealthKit unit for measuring volume in imperial cups.

+ pintUSUnit

Returns a HealthKit unit for measuring volume in US pints.

+ pintImperialUnit

Returns a HealthKit unit for measuring volume in imperial pints.