enumerateObjects(options:using:)
Executes a given block using each object in the set, using the specified enumeration options.
Declaration
func enumerateObjects(options opts: NSEnumerationOptions = [], using block: (Any, Int, UnsafeMutablePointer<ObjCBool>) -> Void)Parameters
- opts:
A bitmask that specifies the options for the enumeration (whether it should be performed concurrently and whether it should be performed in reverse order).
- block:
The block to apply to elements in the ordered set.
The block takes three arguments:
- obj
The element in the set.
- idx
The index of the item in the set.
- stop
A reference to a Boolean value. The block can set the value to True to stop further processing of the set. The
stopargument is an out-only argument. You should only ever set this value to True within the block.
The block returns a Boolean value that indicates whether
objpassed the test.
See Also
Accessing Set Members
contains(_:)enumerateObjects(at:options:using:)enumerateObjects(_:)firstObjectlastObjectobject(at:)subscript(_:)objects(at:)index(of:)index(of:inSortedRange:options:usingComparator:)index(ofObjectAt:options:passingTest:)index(ofObjectPassingTest:)index(_:ofObjectPassingTest:)indexes(ofObjectsAt:options:passingTest:)indexes(ofObjectsPassingTest:)