UIApplication

  • Run a block in background after app resigns activity

    Declaration

    Swift

    public func runInBackground(_ closure: @escaping () -> Void, expirationHandler: (() -> Void)? = nil)
  • Get the top most view controller from the base view controller; default param is UIWindow’s rootViewController

    Declaration

    Swift

    public class func topViewController(_ base: UIViewController? = UIApplication.shared.keyWindow?.rootViewController) -> UIViewController?