---
title: "present(_:animator:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsviewcontroller/present(_:animator:)"
---

# present(_:animator:)

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

## Declaration

```swift
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 doc://com.apple.appkit/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

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:) presentAsModalWindow(_:) presentAsSheet(_:) Each of these methods calls this method in turn. User interaction is blocked during presentation and dismissal.

## See Also

### Presenting Another View Controller’s Content

- [dismiss(_:)](appkit/nsviewcontroller/dismiss(_:)-91my5.md)
- [present(_:asPopoverRelativeTo:of:preferredEdge:behavior:)](appkit/nsviewcontroller/present(_:aspopoverrelativeto:of:preferrededge:behavior:).md)
- [present(_:asPopoverRelativeTo:of:preferredEdge:behavior:hasFullSizeContent:)](appkit/nsviewcontroller/present(_:aspopoverrelativeto:of:preferrededge:behavior:hasfullsizecontent:).md)
- [presentAsModalWindow(_:)](appkit/nsviewcontroller/presentasmodalwindow(_:).md)
- [presentAsSheet(_:)](appkit/nsviewcontroller/presentassheet(_:).md)
- [present(inWidget:)](appkit/nsviewcontroller/present(inwidget:).md)
