Question

Is there a way that I could create a subview that will stay on the screen even as the user moves back and forth between the different viewControllers in the app?

I have a game where each level is a separate .h/.m/.xib viewController, but I would like to release a free version with ads - trying to figure out how I can get the ads to persist on screen regardless of the viewController currently shown, so that I am not removing and adding a new ad each time the level switches.

Any ideas would be greatly appreciated. Thanks in advance!

Was it helpful?

Solution

If you add your view to your application's window AFTER adding the NavigationController (or TabBarController, or whatever your root view controller is)'s view, then it will 'float' above all the other views.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top