Initializer

init(indexesIn:)

Initializes an allocated NSIndexSet object with an index range.

Declaration

init(indexesIn range: NSRange)

Parameters

indexRange

An index range. Must be in the range 0 .. NSNotFound - 1..

Return Value

Initialized NSIndexSet object with indexRange.

Discussion

This method raises an rangeException when indexRange would add an index that exceeds the maximum allowed value for unsigned integers.

The resulting index set has a firstIndex equal to the location of indexRange, and a count equal to the length of indexRange. Specifying a zero-length range results in an empty index set.

This method is a designated initializer for NSIndexSet.

See Also

Creating Index Sets

init(index: Int)

Initializes an allocated NSIndexSet object with an index.

init(indexSet: IndexSet)

Initializes an allocated NSIndexSet object with an index set.

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