From 6840412f254433f7986df81aa2ec2b432e7cde70 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 26 May 2023 16:36:59 -0500 Subject: [PATCH] added comments to the UIApplication extension Signed-off-by: Matt Bruce --- VDS/Extensions/UIApplication.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VDS/Extensions/UIApplication.swift b/VDS/Extensions/UIApplication.swift index 52cf69d6..956bd3d5 100644 --- a/VDS/Extensions/UIApplication.swift +++ b/VDS/Extensions/UIApplication.swift @@ -10,6 +10,9 @@ import UIKit extension UIApplication { + /// Helper method to find the top most viewcontroller in the app + /// - Parameter controller: UIViewController to test against + /// - Returns: Found top most UIViewController public class func topViewController(controller: UIViewController? = UIApplication.shared.windows.first?.rootViewController) -> UIViewController? { if let nav = controller as? UINavigationController {