Returns a predicate that matches samples based on the target quantity.
- iOS 8.0+
- Mac Catalyst 13.0+
- watchOS 2.0+
The operator type to use when comparing the sample’s quantity to the target quantity.
The target quantity object.
A predicate that matches samples based on the target quantity. This predicate works only on quantity samples.
Use this convenience method to create a predicate that matches against a sample’s quantity. The following sample uses both the convenience method and a predicate format string to create equivalent predicates.