Contents

init(predicate:options:)

Creates a statistics query descriptor.

Declaration

init(predicate: HKSamplePredicate<HKQuantitySample>, options: HKStatisticsOptions)

Parameters

  • predicate:

    A predicate that defines the set of data that the query uses to calculate the statistics.

  • options:

    A list of options that define the type of statistical calculations performed and the way in which HealthKit merges data from multiple sources. For a list of valid options, see Hkstatisticsoptions.