app delegate in swift code example
Example: how to call app delegate function in swift
// get a reference to the app delegate
guard let let appDelegate: AppDelegate? = UIApplication.shared.delegate as? AppDelegate else { return }
// call function
appDelegate.someFunc()