<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableView/hideRows(at:withAnimation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableView(im)hideRowsAtIndexes:withAnimation:"
  },
  "title" : "hideRows(at:withAnimation:)"
}
-->

# hideRows(at:withAnimation:)

Hides the specified table rows.

```
func hideRows(at indexes: IndexSet, withAnimation rowAnimation: NSTableView.AnimationOptions = [])
```

## Parameters

`indexes`

An index set containing indexes of the rows to be hidden.

`rowAnimation`

An animation effect to be applied when the rows are hidden.

## Discussion

Use this method when you no longer want the data to be visible to the user, but you don’t want to permanently remove the data. Hidden table rows have a height of zero and cannot be selected by the user. However, if a selected table row is hidden, it will remain selected.

Hiding a table row causes the [`tableView(_:didRemove:forRow:)`](/documentation/AppKit/NSTableViewDelegate/tableView(_:didRemove:forRow:)) delegate method to be invoked.

## See Also

[`AnimationOptions`](/documentation/AppKit/NSTableView/AnimationOptions)

Specifies the animation effects to apply when inserting or removing rows.

[`-  tableView:didRemoveRowView:forRow:`](/documentation/AppKit/NSTableViewDelegate/tableView(_:didRemove:forRow:))

Tells the delegate that a row view was removed from the table at the specified row.



---

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)