---
title: "hideRows(at:withAnimation:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstableview/hiderows(at:withanimation:)"
---

# hideRows(at:withAnimation:)

Hides the specified table rows.

## Declaration

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

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:) delegate method to be invoked.

## See Also

### Related Documentation

- [NSTableView.AnimationOptions](appkit/nstableview/animationoptions.md)
- [tableView(_:didRemove:forRow:)](appkit/nstableviewdelegate/tableview(_:didremove:forrow:).md)

### Hiding and Showing Table Rows

- [unhideRows(at:withAnimation:)](appkit/nstableview/unhiderows(at:withanimation:).md)
- [hiddenRowIndexes](appkit/nstableview/hiddenrowindexes.md)
