I need to add a view directly to the window. I can do this by accessing the window object on the AppDelegate via UIApplication. I intend on making this code as reusable as possible though which makes that method unhelpful. How can I access the UIWindow programmatically without using AppDelegate?
I'm coding in Swift but Objective-C examples may be helpful too.