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

# adjustScroll(_:)

Overridden by subclasses to modify a given rectangle, returning the altered rectangle.

```
func adjustScroll(_ newVisible: NSRect) -> NSRect
```

## Parameters

`newVisible`

A rectangle that defines a region of the view.

## Discussion

[`NSClipView`](/documentation/AppKit/NSClipView) invokes this method to allow its document view to adjust its position during scrolling. For example, a custom view object that displays a table of data can adjust the origin of `newVisible` so rows or columns aren’t cut off by the edge of the enclosing [`NSClipView`](/documentation/AppKit/NSClipView). The [`NSView`](/documentation/AppKit/NSView) implementation simply returns `newVisible`.

[`NSClipView`](/documentation/AppKit/NSClipView) only invokes this method during automatic or user controlled scrolling. Its [`scroll(to:)`](/documentation/AppKit/NSClipView/scroll(to:)) method doesn’t invoke this method, so you can still force a scroll to an arbitrary point.

---

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)