<!--
{
  "availability" : [
    "macOS: 10.6.0 - 10.10.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableView/shouldFocusCell(_:atColumn:row:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableView(im)shouldFocusCell:atColumn:row:"
  },
  "title" : "shouldFocusCell(_:atColumn:row:)"
}
-->

# shouldFocusCell(_:atColumn:row:)

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

```
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

<doc://com.apple.documentation/documentation/Swift/true> if the cell can be made the focused cell, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

By default, only cells that are enabled can be focused. In addition, if the cell is an [`NSTextFieldCell`](/documentation/AppKit/NSTextFieldCell), it can only be focused if it is selectable or editable, and the table view delegate responds <doc://com.apple.documentation/documentation/Swift/true> to -[`tableView(_:shouldEdit:row:)`](/documentation/AppKit/NSTableViewDelegate/tableView(_:shouldEdit:row:)).

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

> Note:
> This method is only applicable to ``doc://com.apple.appkit/documentation/AppKit/NSCell``-based table views.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)