<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionViewDelegate/collectionView(_:didEndDisplayingSupplementaryView:forElementOfKind:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSCollectionViewDelegate(im)collectionView:didEndDisplayingSupplementaryView:forElementOfKind:atIndexPath:"
  },
  "title" : "collectionView(_:didEndDisplayingSupplementaryView:forElementOfKind:at:)"
}
-->

# collectionView(_:didEndDisplayingSupplementaryView:forElementOfKind:at:)

Notifies the delegate that the specified supplementary view was removed from the collection view.

```
@MainActor optional func collectionView(_ collectionView: NSCollectionView, didEndDisplayingSupplementaryView view: NSView, forElementOfKind elementKind: NSCollectionView.SupplementaryElementKind, at indexPath: IndexPath)
```

## Parameters

`collectionView`

The collection view that removed the view.

`view`

The supplementary view that was removed.

`elementKind`

The type of the supplementary view. Layouts are responsible for defining the types of supplementary views they support.

`indexPath`

The index path associated with the supplementary view.

## Discussion

The collection view calls this method after removing a supplementary view from its content. You can use this method to track the removal of views and perform related tasks.

---

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)