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

# prepare()

Gives you an opportunity to perform layout calculations when the scrubber’s layout is invalidated.

```
func prepare()
```

## Discussion

Use this method in subclasses to perform layout calculations and caching in advance of rendering the scrubber.

The system calls this method when the scrubber’s layout is invalidated.

The base implementation of this method does nothing.

---

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)