views:

122

answers:

1

Hello.

I've been able to incorporate all of Apple's code, delegation, etc related to iAds... in simple view based applications.

Tab bar type applications seem more difficult... perhaps I don't understand the overall architecture of those apps. It seems that say if there are 3 tabs and views corresponding to those tabs that the other tabs sort of inherit or are attached to the first tab.

When working in interface builder it seems that dragging an adbanner into the windows actually replaces everything that is there and building some kind of view container to put the "tab infrastructure and associated views" and an iad doesn't seem to fly.

I'm able to code by hand the pop of an ad in my code... which shows up when running the app under the first tab, but it doesn't show on the subsequent tabs... I was doing this in viewDidLoad. It seems the tab bar apps want to sort of own the entire screen realestate to some extent.... thoughts? There's a UIWindow and the TabBarController.. the window seems largely "blank" and otherwise purposeless...

Thanks

+1  A: 

What I would do is create a separate custom view, which you push onto your enclosed view in each tab just as part of the viewDidLoad process.

jer
I'm popping an ad programmatically in the viewDidLoad process... I guess I'm not understanding the tab bar view very well... wouldn't it call viewDidLoad when switching between each tab or is that deeper within viewDidLoad or in an other method?
Seann
viewDidLoad is called when new views are well, loaded. But honestly, I wouldn't create the ad like you just said you're doing. Create it somewhere else, on its own. Then in each view, just add it as a subview. This way, you create it once, use it everywhere.
jer