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

# animatePresentation(of:from:)

Called when the specified view controller is about to be presented.

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

## Parameters

`viewController`

The view controller that is being presented in place of the one in the `fromViewController` parameter.

`fromViewController`

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

## Discussion

To add custom presentation 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)