visibleViewController
The view controller associated with the currently visible view in the navigation interface.
Declaration
var visibleViewController: UIViewController? { get }Discussion
The currently visible view can belong either to the view controller at the top of the navigation stack or to a view controller that was presented modally on top of the navigation controller itself.