Creates an NSExpression object that will use the Block for evaluating objects.
- iOS 4.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The Block is applied to the object to be evaluated.
The Block takes three arguments and returns a value:
The object to be evaluated.
An array of predicate expressions that evaluates to a collection.
A dictionary that the expression can use to store temporary state for one predicate evaluation.
contextis mutable, and that it can only be accessed during the evaluation of the expression. You must not attempt to retain it for use elsewhere. ]
The Block returns the
An array containing
NSExpressionobjects that will be used as parameters during the invocation of selector.
For a selector taking no parameters, the array should be empty. For a selector taking one or more parameters, the array should contain one
NSExpressionobject which will evaluate to an instance of the appropriate type for each parameter.
If there is a mismatch between the number of parameters expected and the number you provide during evaluation, an exception may be raised or missing parameters may simply be replaced by
nil(which occurs depends on how many parameters are provided, and whether you have over- or underflow).
init(forfor a complete list of arguments.
An expression that filters a collection using the specified Block.