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

# viewDidDisappear()

Called after the title bar accessory view controller’s view is removed from the window’s view hierarchy.

```
func viewDidDisappear()
```

## Discussion

You can override this method to perform tasks associated with removing the title bar accessory view controller’s view from the window’s view hierarchy—such as releasing resources not needed when the view is not visible or no longer part of the window—but you must call `super` in your implementation.

---

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)