Evaluates a given predicate against each object in the receiving set and returns a new set containing the objects for which the predicate returns true.
- iOS 3.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
A new set containing the objects in the receiving set for which
predicate returns true.
The following example illustrates the use of this method.
Accessing Set Members
An array containing the set’s members, or an empty array if the set has no members.
Returns one of the objects in the set, or
nil if the set contains no objects.
Returns a Boolean value that indicates whether a given object is present in the set.
Determines whether a given object is present in the set, and returns that object if it is.
Returns an enumerator object that lets you access each object in the set.