Instance Method

dismissViewController:

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

Declaration

- (void)dismissViewController:(NSViewController *)viewController;

Parameters

viewController

The presented view controller that you are dismissing.

Discussion

In macOS, this is the universal way to dismiss a view controller, no matter how it was presented.

See Also

Presenting Another View Controller’s Content

- presentViewController:animator:

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

- presentViewControllerAsModalWindow:

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

- presentViewControllerAsSheet:

Presents another view controller as a sheet.