Add overlay view on all other views

how do you add an overlay view that views everything. for example above a tab bar controller and a navigation controller?

thanks

+2


a source to share


3 answers


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

[self.tabBarController.view addSubview:myView];

      



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

+2


a source


Add window. What the popup keyboard and UIAlertView do, you can see what's in this view dump .



+2


a source


Use a modal view controller. Read this guide:

http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html

The view of the view controller itself is easy:

UINavigationController *navigationController = [[UINavigationController alloc]
                         initWithRootViewController:addController];
[self presentModalViewController:navigationController animated:YES];

      

+2


a source







All Articles