<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewLayoutInvalidationContext/invalidateSupplementaryElements(ofKind:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionViewLayoutInvalidationContext(im)invalidateSupplementaryElementsOfKind:atIndexPaths:"
  },
  "title" : "invalidateSupplementaryElements(ofKind:at:)"
}
-->

# invalidateSupplementaryElements(ofKind:at:)

Adds the supplementary views at the specified index paths to the list of invalid items.

```
func invalidateSupplementaryElements(ofKind elementKind: String, at indexPaths: [IndexPath])
```

## Parameters

`elementKind`

A string that identifies the type of the supplementary views. This parameter must not be `nil`.

`indexPaths`

An array of <doc://com.apple.documentation/documentation/Foundation/NSIndexPath> objects. Each index path represents a supplementary view of the given kind whose layout needs to be recomputed.

## Discussion

Call this method to identify the specific supplementary views of your layout that require updates. The views you specify are added to the dictionary in the [`invalidatedSupplementaryIndexPaths`](/documentation/UIKit/UICollectionViewLayoutInvalidationContext/invalidatedSupplementaryIndexPaths) property. All of the views you specify should be of the type that you specified in the `elementKind` parameter. If you call this method two or more times with the same value for the `elementKind` parameter, this method merges the new index paths with the ones previously specified.

---

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)