tableView(_:shouldSelectRow:)
Asks the delegate if the table view should allow selection of the specified row.
Declaration
@MainActor optional func tableView(_ tableView: NSTableView, shouldSelectRow row: Int) -> BoolParameters
- tableView:
The table view that sent the message.
- row:
The row index.
Return Value
true to permit selection of the row, false to deny selection.
Discussion
The delegate can implement this method to disallow selection of particular rows.
For better performance and finer-grain control over the selection, use tableView(_:selectionIndexesForProposedSelection:).
See Also
Selecting rows
selectionShouldChange(in:)tableView(_:selectionIndexesForProposedSelection:)tableView(_:shouldSelect:)tableViewSelectionIsChanging(_:)tableViewSelectionDidChange(_:)tableView(_:shouldTypeSelectFor:withCurrentSearch:)tableView(_:typeSelectStringFor:row:)tableView(_:nextTypeSelectMatchFromRow:toRow:for:)