<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/getRectsExposedDuringLiveResize(_:count:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(im)getRectsExposedDuringLiveResize:count:"
  },
  "title" : "getRectsExposedDuringLiveResize(_:count:)"
}
-->

# getRectsExposedDuringLiveResize(_:count:)

Returns a list of rectangles indicating the newly exposed areas of the view.

```
func getRectsExposedDuringLiveResize(_ exposedRects: UnsafeMutablePointer<NSRect>, count: UnsafeMutablePointer<Int>)
```

## Parameters

`exposedRects`

On return, contains the list of rectangles. The returned rectangles are in the coordinate space of the view.

`count`

Contains the number of rectangles in `exposedRects`; this value may be 0 and is guaranteed to be no more than 4.

## Discussion

If your view does not support content preservation during live resizing, the entire area of your view is returned in the `exposedRects` parameter. To support content preservation, override the [`preservesContentDuringLiveResize`](/documentation/AppKit/NSView/preservesContentDuringLiveResize) property in your view and have your implementation return <doc://com.apple.documentation/documentation/Swift/true>.

> Note:
> The window containing your view must also support content preservation. To enable support for this feature in your window, use the ``doc://com.apple.appkit/documentation/AppKit/NSWindow/preservesContentDuringLiveResize`` method of `NSWindow`.

If the view decreased in both height and width, the list of returned rectangles will be empty. If the view increased in both height and width and its upper-left corner stayed anchored in the same position, the list of returned rectangles will contain a vertical and horizontal component indicating the exposed area.

---

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)