objectEnumerator()
Returns an enumerator object that lets you access each object in the set once, independent of its count.
Declaration
func objectEnumerator() -> NSEnumeratorReturn Value
An enumerator object that lets you access each object in the set once, independent of its count.
Discussion
If you add a given object to the counted set multiple times, an enumeration of the set will produce that object only once.
You shouldn’t modify the set during enumeration. If you intend to modify the set, use the allObjects method to create a “snapshot,” then enumerate the snapshot and modify the original set.