---
title: NSCollectionViewFlowLayoutInvalidationContext
framework: appkit
role: symbol
role_heading: Class
path: appkit/nscollectionviewflowlayoutinvalidationcontext
---

# NSCollectionViewFlowLayoutInvalidationContext

An object that identifies the portions of a flow layout object that need to be updated.

## Declaration

```swift
class NSCollectionViewFlowLayoutInvalidationContext
```

## Overview

Overview Layout objects use invalidation contexts to optimize the layout process and avoid unnecessary work. You use this class to specify whether the NSCollectionViewFlowLayout object should fetch new size information from its delegate. You can also prevent the flow layout object from updating its layout information altogether. When you want to invalidate your flow layout object, call the invalidationContextClass method of your layout object and instantiate the resulting class. (The implementation of that method in NSCollectionViewFlowLayout returns this class.) After instantiating this class, set the properties to appropriate values and pass the object to the invalidateLayout(with:) method of the layout object.

## Topics

### Invalidating the Flow Layout

- [invalidateFlowLayoutAttributes](appkit/nscollectionviewflowlayoutinvalidationcontext/invalidateflowlayoutattributes.md)
- [invalidateFlowLayoutDelegateMetrics](appkit/nscollectionviewflowlayoutinvalidationcontext/invalidateflowlayoutdelegatemetrics.md)

## Relationships

### Inherits From

- [NSCollectionViewLayoutInvalidationContext](appkit/nscollectionviewlayoutinvalidationcontext.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Updates

- [NSCollectionViewUpdateItem](appkit/nscollectionviewupdateitem.md)
- [NSCollectionViewLayoutInvalidationContext](appkit/nscollectionviewlayoutinvalidationcontext.md)
