Vikings
Vikings

Reputation: 2527

iAd Banner Question

I am getting this warning when I switch views (which are just different themes) in my app. Any ideas, suggestions on why the app is not loading?

2011-04-25 16:14:20.211 MyApp [4121:40b] ADBannerView: WARNING A banner view (0x631bb30) has an ad but may be obscured. This message is only printed once per banner view.

enter image description here

It appears that when the view switches, the other view is just in the background, any ideas on how to do this.

** Note there is an excellent example on Apple's developer site, called iADSuite

Upvotes: 5

Views: 3824

Answers (3)

Joshua Goossen
Joshua Goossen

Reputation: 1724

I know this is not the answer to your question for your scenario, but for others it may be, as it was for me. I am using Adwhirl and was using the animated transitions. I turned those transitions off and diminished these warnings drastically.

Upvotes: 0

Marin Todorov
Marin Todorov

Reputation: 6397

This message means that a banner has a part that is or it is fully not visible. If you do read the iAd documentation from Apple you will notice that they recommend having only one iAd instance which you should use for all your views (uiviewcontrollers)

how I do iAds in my apps is - I have 1 singleton class which shows the iAd banner (thus I follow Apple's recommendation to have only 1 iAd instance). In all my viewcontrollers in the viewDidLoad method I show the iAd view from my singleton class and in viewWillDisappear I remove the iAd view from the viewcontroller.

This way the banner view is always visible in only 1 viewcontroller - therefore it never is "obscured" and such.

I hope this explanation helps you out :)

Upvotes: 11

David Neiss
David Neiss

Reputation: 8237

Look at your view heirarchy. Do you have the new view set with an iAd and is that overlaying your iAd view. Or are you recreating the iAd view again? Dump the view heirarchy and see what views are present, you may find you have two instances.

Try: [topView recursiveDescription]

Upvotes: 0

Related Questions