Type Method

predicateWithFormat:argumentArray:

Initializes a predicate by substituting the values in a given array into a format string and parsing the result.

Declaration

+ (NSPredicate *)predicateWithFormat:(NSString *)predicateFormat argumentArray:(NSArray *)arguments;

Parameters

predicateFormat

The format string for the new predicate.

arguments

The arguments to substitute into predicateFormat. Values are substituted in the order they appear in the array.

Return Value

A new predicate by substituting the values in arguments into predicateFormat, and parsing the result.

Discussion

For details of the format of the format string and of limitations on variable substitution, see Predicate Format String Syntax.

See Also

Creating a Predicate

+ predicateWithFormat:

Creates and returns a new predicate formed by creating a new string with a given format and parsing the result.

+ predicateWithFormat:arguments:

Initializes a predicate by substituting the values in an argument list into a format string and parsing the result.

- predicateWithSubstitutionVariables:

Returns a copy of the predicate with the predicate's variables substituted by values specified in a given substitution variables dictionary.

+ predicateWithValue:

Creates and returns a predicate that always evaluates to a given Boolean value.

+ predicateWithBlock:

Initializes a predicate that evaluates using a specified block object and bindings dictionary.

+ predicateFromMetadataQueryString:

Initializes a predicate with a metadata query string.

Beta Software

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