correlationType(forIdentifier:)
Returns the shared correlation type for the provided identifier.
Declaration
class func correlationType(forIdentifier identifier: HKCorrelationTypeIdentifier) -> HKCorrelationType?Parameters
- identifier:
A correlation type identifier. For a list of valid identifiers, see Hkcorrelationtypeidentifier.
Return Value
The shared HKCorrelationType instance based on the provided identifier.
Discussion
This method returns an instance of the HKCorrelationType concrete subclass. HealthKit uses correlation types to create complex data objects that contain multiple values. Use correlation type instances to create correlation objects that you can save in the HealthKit store. For more information, see HKCorrelation.