<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCollectionViewLayoutInvalidationContext/invalidateItems(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCollectionViewLayoutInvalidationContext(im)invalidateItemsAtIndexPaths:"
  },
  "title" : "invalidateItems(at:)"
}
-->

# invalidateItems(at:)

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

```
func invalidateItems(at indexPaths: Set<IndexPath>)
```

## Parameters

`indexPaths`

A set of <doc://com.apple.documentation/documentation/Foundation/NSIndexPath> objects. Each index path represents an item whose layout needs to be recomputed.

## Discussion

Call this method when you want the layout object to recompute attributes for a specific set of items. The items you provide are added to the [`invalidatedItemIndexPaths`](/documentation/AppKit/NSCollectionViewLayoutInvalidationContext/invalidatedItemIndexPaths) property. You can call this method more than once to create a merged set of items.

---

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)