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

# present(_:animator:)

Presents another view controller using a specified, custom animator for presentation and dismissal.

```
func present(_ viewController: NSViewController, animator: any NSViewControllerPresentationAnimator)
```

## Parameters

`viewController`

The other view controller to present from the view controller.
  
  > Note:
  > The view controller you provide in this parameter must not already be visible elsewhere, or else this method raises an exception.
  > 
  > The view in the presented view controller must have a window, or else this method raises an exception.

`animator`

The animation delegate to employ for presentation and dismissal of the other view controller. The animator that you specify is retained until the [`dismiss(_:)`](/documentation/AppKit/NSViewController/dismiss(_:)-91my5) method is called and the dismissal animation completes.
  
  > Note:
  > This parameter’s value must not be `nil`, or else this method raises an exception.

## Discussion

Do not call this method unless you want to use a custom animator. To use one of the standard animators to present another view controller, instead call one of the dedicated presentation methods:

- [`present(_:asPopoverRelativeTo:of:preferredEdge:behavior:)`](/documentation/AppKit/NSViewController/present(_:asPopoverRelativeTo:of:preferredEdge:behavior:))
- [`presentAsModalWindow(_:)`](/documentation/AppKit/NSViewController/presentAsModalWindow(_:))
- [`presentAsSheet(_:)`](/documentation/AppKit/NSViewController/presentAsSheet(_:))

Each of these methods calls this method in turn. User interaction is blocked during presentation and dismissal.

---

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)