<!--
{
  "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/UICollectionViewFlowLayoutInvalidationContext/invalidateFlowLayoutAttributes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionViewFlowLayoutInvalidationContext(py)invalidateFlowLayoutAttributes"
  },
  "title" : "invalidateFlowLayoutAttributes"
}
-->

# invalidateFlowLayoutAttributes

A Boolean indicating whether to recompute the layout attributes for items and views in the layout.

```
var invalidateFlowLayoutAttributes: Bool { get set }
```

## Discussion

The default value of this property is <doc://com.apple.documentation/documentation/Swift/false>. Set this property to <doc://com.apple.documentation/documentation/Swift/true> if there are changes to the position of items on the screen. For example, the flow layout object sets this property to <doc://com.apple.documentation/documentation/Swift/true> when the collection view’s bounds change in a way that affects the number of items in a column or row.

When this property is set to <doc://com.apple.documentation/documentation/Swift/true>, the flow layout object recomputes the layout attributes for its items and views. If the [`invalidateFlowLayoutDelegateMetrics`](/documentation/UIKit/UICollectionViewFlowLayoutInvalidationContext/invalidateFlowLayoutDelegateMetrics) property is set to <doc://com.apple.documentation/documentation/Swift/false> it recomputes this information without asking for new size information.

---

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)