<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOutlineViewDelegate/outlineView(_:didRemove:forRow:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSOutlineViewDelegate(im)outlineView:didRemoveRowView:forRow:"
  },
  "title" : "outlineView(_:didRemove:forRow:)"
}
-->

# outlineView(_:didRemove:forRow:)

Implemented to know when a row view is removed from the table

```
@MainActor optional func outlineView(_ outlineView: NSOutlineView, didRemove rowView: NSTableRowView, forRow row: Int)
```

## Parameters

`outlineView`

The outline view that sent the message.

`rowView`

The row view that was removed.

`row`

The number of the row that was removed due to being moved offscreen, or `-1` if the row was removed from the table so it is no longer valid.

## Discussion

The removed `rowView` may be reused by the table, so any additionally inserted views should be removed at this point.

---

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)