<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -",
    "tvOS: 26.4.0 -",
    "visionOS: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UITextInput/unobscuredContentRect",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UITextInput(py)unobscuredContentRect"
  },
  "title" : "unobscuredContentRect"
}
-->

# unobscuredContentRect

The visible content region, excluding parts covered by view-specific UI.

```
optional var unobscuredContentRect: CGRect { get }
```

## Return Value

The visible content rectangle, or CGRectNull if there is no specific constraint.

## Discussion

Account for scroll position, insets, and any custom UI elements (toolbars,
accessories, etc.) that obscure content. The system automatically accounts for
keyboard obscuring when editing.

The rectangle is in the `textInputView` coordinate space.

---

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)