setSelectionIndexes(_:)
Sets the receiver’s selection indexes and returns a Boolean value that indicates whether the selection changed.
Declaration
func setSelectionIndexes(_ indexes: IndexSet) -> BoolParameters
- indexes:
The set of selection indexes for the receiver.
Return Value
Discussion
Attempting to change the selection may cause a commitEditing() message which fails, thus denying the selection change.
To select all the receiver’s objects, indexes should be an index set with indexes [0...count -1]. To deselect all indexes, pass an empty index set.