<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewLayout/invalidationContextClass",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionViewLayout(cpy)invalidationContextClass"
  },
  "title" : "invalidationContextClass"
}
-->

# invalidationContextClass

Returns the class to use when creating an invalidation context for the layout.

```
class var invalidationContextClass: AnyClass { get }
```

## Discussion

If you subclass `UICollectionViewLayout` and use a custom invalidation context object to improve the performance of your layout updates, override this method and return your [`UICollectionViewLayoutInvalidationContext`](/documentation/UIKit/UICollectionViewLayoutInvalidationContext) subclass. When the collection view needs to invalidate your layout, it uses the class you provide to create an appropriate invalidation context object.

---

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)