Contents

setSelectionIndex(_:)

Sets the receiver’s selection to the given index, and returns a Boolean value that indicates whether the selection was changed.

Declaration

func setSelectionIndex(_ index: Int) -> Bool

Parameters

  • index:

    The index for the selection.

Return Value

true if the selection was changed, otherwise false.

Discussion

Attempting to change the selection may cause a commitEditing() message which fails, thus denying the selection change.

See Also

Managing selections