<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UICollectionViewLayout/shouldInvalidateLayout(forBoundsChange:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UICollectionViewLayout(im)shouldInvalidateLayoutForBoundsChange:"
  },
  "title" : "shouldInvalidateLayout(forBoundsChange:)"
}
-->

# shouldInvalidateLayout(forBoundsChange:)

Asks the layout object if the new bounds require a layout update.

```
func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool
```

## Parameters

`newBounds`

The new bounds of the collection view.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the collection view requires a layout update or <doc://com.apple.documentation/documentation/Swift/false> if the layout does not need to change.

## Discussion

The default implementation of this method returns <doc://com.apple.documentation/documentation/Swift/false>. Subclasses can override it and return an appropriate value based on whether changes in the bounds of the collection view require changes to the layout of cells and supplementary views.

If the bounds of the collection view change and this method returns <doc://com.apple.documentation/documentation/Swift/true>, the collection view invalidates the layout by calling the [`invalidateLayout(with:)`](/documentation/UIKit/UICollectionViewLayout/invalidateLayout(with:)) method.

---

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)