Evaluates a given predicate against the set’s content and removes from the set those objects for which the predicate returns false.
- iOS 3.0+
- macOS 10.5+
- tvOS 9.0+
- watchOS 2.0+
The following example illustrates the use of this method.
Adding and removing entries
Adds a given object to the set, if it is not already a member.