Overlay a view over whole screen, when using UITabBarController?

cannyboy picture cannyboy · Oct 4, 2010 · Viewed 10.2k times · Source

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), and the overlay should also cover the tabs... is this possible?

Answer

Henrik P. Hessel picture Henrik P. Hessel · Oct 4, 2010

You could attach your new view to your window directly.

[[[UIApplication sharedApplication] keyWindow] addSubview:myNewView];