<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSViewControllerPresentationAnimator/animateDismissal(of:from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSViewControllerPresentationAnimator(im)animateDismissalOfViewController:fromViewController:"
  },
  "title" : "animateDismissal(of:from:)"
}
-->

# animateDismissal(of:from:)

Called when a previously-presented view controller is about to be dismissed.

```
@MainActor func animateDismissal(of viewController: NSViewController, from fromViewController: NSViewController)
```

## Parameters

`viewController`

The view controller that is being dismissed.

`fromViewController`

The view controller that is the parent of the one in the `viewController` parameter.

## Discussion

To add custom view controller dismissal animation, Implement it in this method.

---

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)