---
title: "scrollToVisible(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsview/scrolltovisible(_:)"
---

# scrollToVisible(_:)

Scrolls the view’s closest ancestor NSClipView object the minimum distance needed so a specified region of the view becomes visible in the clip view.

## Declaration

```swift
func scrollToVisible(_ rect: NSRect) -> Bool
```

## Parameters

- `rect`: The rectangle to be made visible in the clip view.

## Discussion

Discussion true if any scrolling is performed; otherwise returns false.

## See Also

### Related Documentation

- [scroll(to:)](appkit/nsclipview/scroll(to:).md)
- [isDescendant(of:)](appkit/nsview/isdescendant(of:).md)

### Scrolling the View

- [prepareContent(in:)](appkit/nsview/preparecontent(in:).md)
- [preparedContentRect](appkit/nsview/preparedcontentrect.md)
- [scroll(_:)](appkit/nsview/scroll(_:).md)
- [autoscroll(with:)](appkit/nsview/autoscroll(with:).md)
- [adjustScroll(_:)](appkit/nsview/adjustscroll(_:).md)
- [enclosingScrollView](appkit/nsview/enclosingscrollview.md)
- [scroll(_:to:)](appkit/nsview/scroll(_:to:).md)
- [reflectScrolledClipView(_:)](appkit/nsview/reflectscrolledclipview(_:).md)
- [isCompatibleWithResponsiveScrolling](appkit/nsview/iscompatiblewithresponsivescrolling.md)
