---
title: "setContentVisibleFrame(_:animated:)"
framework: paperkit
role: symbol
role_heading: Instance Method
path: "paperkit/papermarkupviewcontroller/setcontentvisibleframe(_:animated:)"
---

# setContentVisibleFrame(_:animated:)

Zooms to a specific area of the content so that it’s visible in the scroll view.

## Declaration

```swift
@MainActor @preconcurrency func setContentVisibleFrame(_ rect: CGRect, animated: Bool)
```

## Discussion

Discussion rect: A rectangle defining an area of the content view. The rectangle should be in the coordinate space of the data model. animated: true if the scrolling should be animated, false if it should be immediate. This method scrolls the content so that the area defined by rect is just visible. If the area is already visible, the method does nothing.

## See Also

### Scrolling and zooming

- [scrollConfiguration](paperkit/papermarkupviewcontroller/scrollconfiguration-swift.property.md)
- [PaperMarkupViewController.ScrollConfiguration](paperkit/papermarkupviewcontroller/scrollconfiguration-swift.class.md)
- [contentVisibleFrame](paperkit/papermarkupviewcontroller/contentvisibleframe.md)
- [zoomRange](paperkit/papermarkupviewcontroller/zoomrange.md)
