Contents

literUnit(with:)

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

Declaration

class func literUnit(with prefix: HKMetricPrefix) -> Self

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.

See Also

Constructing volume units