previewingContext(_:commit:)
Called to let you prepare the presentation of a commit (pop) view from your commit view controller.
Declaration
func previewingContext(_ previewingContext: any UIViewControllerPreviewing, commit viewControllerToCommit: UIViewController)Parameters
- previewingContext:
The context object for the previewing view controller.
- viewControllerToCommit:
The view controller whose view your implementation of this method is moving into place as a commit (pop) view.
Discussion
Implement this method to configure and present the commit (pop) view controller, in a way that is appropriate for your app.
For example, to present the commit view controller’s view in a navigation controller, call the navigation controller’s show(_:sender:) method; to present the view modally, you could call the present(_:animated:completion:) method.