Contents

predicateForObjects(withMetadataKey:)

Returns a predicate that matches any object whose metadata contains the provided key.

Declaration

class func predicateForObjects(withMetadataKey key: String) -> NSPredicate

Parameters

  • key:

    The metadata key to match. For a list of preset keys, see Metadata Keys. You may also search for custom keys.

Return Value

A predicate that matches any object whose metadata contains the provided key.

Discussion

Use this convenience method to create a predicate that finds all objects with a specific key stored in their metadata. The following sample uses both the convenience method and a predicate format string to create equivalent predicates.

See Also

Related Documentation

Creating object predicates