<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSStringDrawingContext/totalBounds",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSStringDrawingContext(py)totalBounds"
  },
  "title" : "totalBounds"
}
-->

# totalBounds

The most recent bounding rectangle that the system used to draw the string.

```
var totalBounds: CGRect { get }
```

## Discussion

This property contains the bounding rectangle that was last used when calling the <doc://com.apple.documentation/documentation/Foundation/NSAttributedString/draw(with:options:context:)> method. The rectangle is specified in the coordinate system of the drawn string. (The origin of the bounds corresponds to neither a view the string might have been drawn into nor the origin of a possible <doc://com.apple.documentation/documentation/Foundation/NSAttributedString/draw(in:)> call.)

---

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)