<!--
{
  "availability" : [
    "macOS: 10.12.2 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSScrubberLayout/shouldInvalidateLayoutForChange(fromVisibleRect:toVisibleRect:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScrubberLayout(im)shouldInvalidateLayoutForChangeFromVisibleRect:toVisibleRect:"
  },
  "title" : "shouldInvalidateLayoutForChange(fromVisibleRect:toVisibleRect:)"
}
-->

# shouldInvalidateLayoutForChange(fromVisibleRect:toVisibleRect:)

Determines whether the scrubber should refresh its layout in response to a change of its visible region.

```
func shouldInvalidateLayoutForChange(fromVisibleRect: NSRect, toVisibleRect: NSRect) -> Bool
```

## Discussion

If <doc://com.apple.documentation/documentation/Swift/true>, the scrubber invalidates its layout in response to a change of the visible region, in response to a user scroll action, or to the scrubber being resized. Subclasses that rely on the size or origin of the visible region should return <doc://com.apple.documentation/documentation/Swift/true>.

The base implementation of this method returns <doc://com.apple.documentation/documentation/Swift/false>.

---

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)