문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top