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

# viewDidEndLiveResize()

Informs the view of the end of a live resize—the user has finished resizing the view.

```
func viewDidEndLiveResize()
```

## Discussion

In the simple case, a view is sent [`viewWillStartLiveResize()`](/documentation/AppKit/NSView/viewWillStartLiveResize()) before the first resize operation on the containing window and [`viewDidEndLiveResize()`](/documentation/AppKit/NSView/viewDidEndLiveResize()) after the last resize operation. A view that is repeatedly added and removed from a window during live resize will receive only one [`viewWillStartLiveResize()`](/documentation/AppKit/NSView/viewWillStartLiveResize()) (on the first time it is added to the window) and one [`viewDidEndLiveResize()`](/documentation/AppKit/NSView/viewDidEndLiveResize()) (when the window has completed the live resize operation). This allows a superview such as [`NSBrowser`](/documentation/AppKit/NSBrowser) object to add and remove its [`NSMatrix`](/documentation/AppKit/NSMatrix) subviews during live resize without the `NSMatrix` receiving multiple calls to these methods.

A view might allocate data structures to cache-drawing information in [`viewWillStartLiveResize()`](/documentation/AppKit/NSView/viewWillStartLiveResize()) and should clean up these data structures in [`viewDidEndLiveResize()`](/documentation/AppKit/NSView/viewDidEndLiveResize()). In addition, a view that does optimized drawing during live resize might need to do full drawing after [`viewDidEndLiveResize()`](/documentation/AppKit/NSView/viewDidEndLiveResize()). However, you should not assume that a view has a drawing context in [`viewDidEndLiveResize()`](/documentation/AppKit/NSView/viewDidEndLiveResize()) (since it may have been removed from the window during live resize). A view that needs to redraw itself after live resize should set its [`needsDisplay`](/documentation/AppKit/NSView/needsDisplay) property to <doc://com.apple.documentation/documentation/Swift/true> in [`viewDidEndLiveResize()`](/documentation/AppKit/NSView/viewDidEndLiveResize()).

A view subclass should call `super` from these methods.

---

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)