<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableViewDelegate/tableView(_:userCanChangeVisibilityOf:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTableViewDelegate(im)tableView:userCanChangeVisibilityOfTableColumn:"
  },
  "title" : "tableView(_:userCanChangeVisibilityOf:)"
}
-->

# tableView(_:userCanChangeVisibilityOf:)

Asks the delegate to verify that the user can change the given column’s visibility.

```
optional func tableView(_ tableView: NSTableView, userCanChangeVisibilityOf column: NSTableColumn) -> Bool
```

## Parameters

`tableView`

The table view object requesting this information.

`column`

The table column affected by the visibility change.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the user can change the visibility of the column; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Implement this method to enable the table view to provide a menu that allows users to show or hide table columns.

To change a column’s visibility, ensure the column has a title. Further, setting the [`menu`](/documentation/AppKit/NSResponder/menu) property on the table view [`headerView`](/documentation/AppKit/NSTableView/headerView) or, subclassing [`NSTableHeaderView`](/documentation/AppKit/NSTableHeaderView) and overriding the [`menu`](/documentation/AppKit/NSResponder/menu) property also prevents the column visibility from changing.

---

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)