I want to overlay a HUD-style transparent graphic over the entire screen in a UITabBarController setup. The button to do this is in the first tab\'s screen (FirstViewController)
I really liked what Chase Robert had written here, so I thought to provide the Swift 3. version as well:
if let window = view.window { let subView = UIView(frame: window.frame) window.addSubview(subView) }
I added the condition as well, so you don't get a crash if there's no windows.