presentingViewController
The view controller that is the starting point for the presentation.
Declaration
var presentingViewController: UIViewController { get }Discussion
The object in this property could be the root view controller of the window, a parent view controller that is marked as defining the current context, or the last view controller that was presented onscreen. This view controller may or may not be the same one whose present(_:animated:completion:) method was called to initiate the presentation process. It may also not be the view controller used to initialize your presentation controller.