removeObjects(in:)
Removes from the receiving array the objects in another given array.
Declaration
func removeObjects(in otherArray: [Any])Parameters
- otherArray:
An array containing the objects to be removed from the receiving array.
Discussion
This method is similar to remove(_:), but it allows you to efficiently remove large sets of objects with a single operation. If the receiving array does not contain objects in otherArray, the method has no effect (although it does incur the overhead of searching the contents).
This method assumes that all elements in otherArray respond to hash and isEqual:.