FrozenHeart
FrozenHeart

Reputation: 20746

Correct way to show iAd Banner View at the bottom of the screen

I want to show iAd Banner View at the bottom of the screen. Also I want to hide it before the first bannerViewDidLoadAd and after bannerView:didFailToReceiveAdWithError methods calls and restore it after any further bannerViewDidLoadAd method calls. What is the correct way to achieve such behavior?

This is what I've tried:

In this case I see a blank screen instead of ad before bannerViewDidLoadAd method was called and the iAd Banner View doesn't appear again when the connection established again (I think that it's because of removeFromSuperview method call). How can I fix it? Maybe there is a more correct way to achieve such behavior?

Thanks in advance.

Upvotes: 0

Views: 142

Answers (1)

Fabian
Fabian

Reputation: 7003

If possible, you should consider using setCanDisplayAds: on your view controller. See Apple's documentation.

Import iAd and set the property on your root view controller, or on the content view controller you wish to display ads at the bottom of.

Upvotes: 1

Related Questions