Type Method

orPredicateWithSubpredicates:

Returns a new predicate formed by OR-ing the predicates in a given array.

Declaration

+ (NSCompoundPredicate *)orPredicateWithSubpredicates:(NSArray<NSPredicate *> *)subpredicates;

Parameters

subpredicates

An array of NSPredicate objects.

Return Value

A new predicate formed by OR-ing the predicates specified by subpredicates.

Discussion

An OR predicate with no subpredicates evaluates to FALSE.

Special Considerations

For applications linked on macOS 10.5 or later, the subpredicates array is copied. For applications linked on OS X v10.4, the subpredicates array is retained (for binary compatibility).

See Also

Constructors

+ andPredicateWithSubpredicates:

Returns a new predicate formed by AND-ing the predicates in a given array.

+ notPredicateWithSubpredicate:

Returns a new predicate formed by NOT-ing a given predicate.

- initWithType:subpredicates:

Returns the receiver initialized to a given type using predicates from a given array.