Instance Method

enumerateRanges(_:)

Executes a given block using each object in the index set, in the specified ranges.

Declaration

func enumerateRanges(_ block: (NSRange, UnsafeMutablePointer<ObjCBool>) -> Void)

Parameters

block

The block to apply to elements in the index set.

The block takes two arguments:

range

The range of objects of the elements in the index set.

stop

A reference to a Boolean value. The block can set the value to true to stop further processing of the array. The stop argument is an out-only argument. You should only ever set this Boolean to true within the Block.

Discussion

If the Block parameter is nil this method will raise an exception.

This method executes synchronously.

See Also

Enumerating Index Set Content

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software