categorySample(type:predicate:)
Returns a sample predicate that matches category samples.
Declaration
static func categorySample(type categoryType: HKCategoryType, predicate: NSPredicate? = nil) -> HKSamplePredicate<HKCategorySample>Parameters
- categoryType:
A type that identifies samples that contain a value from a small set of possible 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 HKCategorySample objects.