add overlay view over all other views

padatronic picture padatronic · May 12, 2010 · Viewed 9.5k times · Source

how do you add an overlay view that goes over everything. eg over a tab bar controller, and a navigation controller?

thanks

Answer

Paul Lynch picture Paul Lynch · May 12, 2010

Find the "top" view in your stack, and add a subview. eg

[self.tabBarController.view addSubview:myView];

The hardest part is finding the topmost view; with a tab bar, it will be its own view.