Contents

shouldFocusCell(_:atColumn:row:)

Returns whether the fully prepared cell at the specified row and column can be made the focused cell.

Declaration

func shouldFocusCell(_ cell: NSCell, atColumn column: Int, row: Int) -> Bool

Parameters

  • cell:

    The prepared cell to be focused upon.

  • column:

    The column of the cell.

  • row:

    The row of the cell.

Return Value

true if the cell can be made the focused cell, otherwise false.

Discussion

By default, only cells that are enabled can be focused. In addition, if the cell is an NSTextFieldCell, it can only be focused if it is selectable or editable, and the table view delegate responds true to -tableView(_:shouldEdit:row:).

Subclasses can override this to further control which cells can and can’t be made focused.

See Also

Deprecated Methods