Question

I want to put an ad on my iPhone application.

And I'm using TabBar to separate some features.

Here's my question. I just want to put ONE AD which always should be displayed no matter what user select & switch between views by pressing tab-bar. I want that ad right above the tab-bar.

I don't want to put ad on every view nor refreshed every time user changes view.

Can somebody give me some idea??

thanks.

Was it helpful?

Solution

Your TabBarControllers view was added to the application window at some point. This is usually in your applicationDidFinishLaunching method if doing it by code, otherwise it is done through Interface Builder. Either way, if you want to add a view globally, do it at the end of applicationDidFinishLaunching and add it as a subview of the application window, not to any individual view controller. Just ensure you are adding it after the tab bar controller as otherwise it will be covered up.

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