A specialized predicate that you use to compare expressions.
- iOS 3.0+
- macOS 10.4+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
You use comparison predicates to compare the results of two expressions. You create a comparison predicate with an operator, a left expression, and a right expression. You represent the expressions using instances of the
NSExpression class. When you evaluate the predicate, it returns as a
BOOL value the result of invoking the operator with the results of evaluating the expressions.
Creating Comparison Predicates
Getting Information About a Comparison Predicate
These constants describe the possible types of string comparison for
NSComparisonPredicate. These options are supported for
LIKE as well as all of the equality/comparison operators.
A definition of logical conditions used to constrain a search either for a fetch or for in-memory filtering.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.Learn more about using Apple's beta software