Instance Method

present(_:animator:)

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

Declaration

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

Parameters

viewController

The other view controller to present from the view controller.

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(_:) method is called and the dismissal animation completes.

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:

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

func dismiss(NSViewController)

Dismisses a presented view controller, using the same animator that presented it.

func presentAsModalWindow(NSViewController)

Presents another view controller as a modal window, also known as an alert.

func presentAsSheet(NSViewController)

Presents another view controller as a sheet.