quantitySample(type:predicate:)
Returns a sample predicate that matches quantity samples.
Declaration
static func quantitySample(type quantityType: HKQuantityType, predicate: NSPredicate? = nil) -> HKSamplePredicate<HKQuantitySample>Parameters
- quantityType:
A type that matches samples that store numerical values.
- predicate:
An optional predicate that further restricts the results that the query returns.
Discussion
Use this method to create an HKSamplePredicate instance that you can use to query for HKQuantitySample objects.