<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PaperKit",
  "identifier" : "/documentation/PaperKit/PaperMarkupViewController/setContentVisibleFrame(_:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PaperKit"
    ],
    "preciseIdentifier" : "s:8PaperKit0A20MarkupViewControllerC22setContentVisibleFrame_8animatedySo6CGRectV_SbtF"
  },
  "title" : "setContentVisibleFrame(_:animated:)"
}
-->

# setContentVisibleFrame(_:animated:)

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

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

## 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.

---

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)