Contents

objects(for:)

Returns a set containing all the objects of the specified type in the correlation.

Declaration

func objects(for objectType: HKObjectType) -> Set<HKSample>

Parameters

  • objectType:

    The quantity or category type for the data stored inside the correlation. For example, to get all the samples measuring calories from inside a correlation, use an Hksampletype object created with the Dietaryenergyconsumed identifier.

Return Value

A set containing all the objects of the specified type in the correlation.

See Also

Getting Correlation Data