init(forConditional:trueExpression:falseExpression:)
Creates an expression that returns a result, depending on the value of predicate.
Declaration
init(forConditional predicate: NSPredicate, trueExpression: NSExpression, falseExpression: NSExpression)Parameters
- predicate:
The predicate for determining whether the element belongs in the result collection.
- trueExpression:
The expression for evaluation when the predicate evaluates to
true. - falseExpression:
The expression for evaluation when the predicate evaluates to
false.