<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/BETextInput/textLastRect",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(pl)BETextInput(py)textLastRect"
  },
  "title" : "textLastRect"
}
-->

# textLastRect

Returns a rect representing the bounds of the last line of marked text, if marked text is set.

```
var textLastRect: CGRect { get }
```

## Discussion

Otherwise, this returns a rect representing the bounds of the last word at or before the insertion point.
This may have the same value of `textFirstRect`, but can differ in cases such as a word that spans two lines.

---

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)