---
title: "invalidateSupplementaryElements(ofKind:at:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscollectionviewlayoutinvalidationcontext/invalidatesupplementaryelements(ofkind:at:)"
---

# invalidateSupplementaryElements(ofKind:at:)

Marks the specified supplementary views as invalid so that their layout information can be updated.

## Declaration

```swift
func invalidateSupplementaryElements(ofKind elementKind: NSCollectionView.SupplementaryElementKind, at indexPaths: Set<IndexPath>)
```

## Parameters

- `elementKind`: A string that identifies the type of the supplementary views. This parameter must not be nil or an empty string.
- `indexPaths`: A set of doc://com.apple.documentation/documentation/Foundation/NSIndexPath objects. Each index path contains the section in which the supplementary view appears.

## Discussion

Discussion Call this method when you want the layout object to recompute attributes for one or more supplementary views. All of the views must be of the type specified by the elementKind parameter. The method adds the views you specify to the invalidatedSupplementaryIndexPaths property. You can call this method more than once for the specified elementKind value.

## See Also

### Invalidating Specific Items

- [invalidateItems(at:)](appkit/nscollectionviewlayoutinvalidationcontext/invalidateitems(at:).md)
- [invalidateDecorationElements(ofKind:at:)](appkit/nscollectionviewlayoutinvalidationcontext/invalidatedecorationelements(ofkind:at:).md)
- [invalidatedItemIndexPaths](appkit/nscollectionviewlayoutinvalidationcontext/invalidateditemindexpaths.md)
- [invalidatedSupplementaryIndexPaths](appkit/nscollectionviewlayoutinvalidationcontext/invalidatedsupplementaryindexpaths.md)
- [invalidatedDecorationIndexPaths](appkit/nscollectionviewlayoutinvalidationcontext/invalidateddecorationindexpaths.md)
