UIAppDelegate and SceneDelegate accessing variables

As you likely know iOS 13 introduced the multiple window concept. Which means what you used to do with


(UIApplication.shared.delegate as! AppDelegate).somevariableHERE

No longer works and I am happy to tell you that you can still do it just slightly different. And in my opinion clearer.

(self.window?.windowScene?.delegate as! SceneDelegate).someOtherVariableHere



Apple usual bare-extreme-bone docs


Popular posts from this blog

Bring Boxee Box back to life

Postgres on Synology

Zen-inification - The art of decluttering