enumerateRanges(options:using:)
Executes a given block using each object in the index set, in the specified ranges.
Declaration
func enumerateRanges(options opts: NSEnumerationOptions = [], using block: (NSRange, UnsafeMutablePointer<ObjCBool>) -> Void)Parameters
- opts:
A bitmask that specifies the Nsenumerationoptions 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 index set.
The block takes two arguments:
Discussion
By default, the enumeration starts with the first object and continues serially through the indexed set range to the last object in the range. You can specify NSEnumerationConcurrent and/or NSEnumerationReverse as enumeration options to modify this behavior.
This method executes synchronously.