predicateForSamples(_:value:)
Returns a predicate that checks a category sample’s value.
Declaration
static func predicateForSamples(_ operatorType: NSComparisonPredicate.Operator, value: Self) -> NSPredicateParameters
- operatorType:
The type of operation to perform when matching the category sample’s value against the target value. For a list of possible operators, see Contains.
- value:
The category sample’s target value. Use an enumeration value appropriate for the type of category samples you’re working with. For example, a predicate for sleep analysis samples use values from the Hkcategoryvaluesleepanalysis enumeration.