I have added an iAd banner view to my project and pinned it to the top of the main view controller in a storyboard. Initially when the app loads the iAd banner is displayed at the bottom of the screen. The banner is then hidden during a game and then unhidden at the end of the game. When the banner is unhidden it appears correctly as designed in the storyboard at the top of the view. Any thoughts why this is happening? This occurs on both the simulator and real devices.
You've created two ADBannerView
's in your application. Once with self.canDisplayBannerAds = true
and once programmatically.
self.canDisplayBannerAds = true
can be used for a no hassle way of implementing iAds in your application. This will create an ADBannerView
for you and show or hide the ADBannerView
depending on whether it receives an ad or not from the iAd network. The ADBannerView
you're seeing at the bottom of your screen is created by self.canDisplayBannerAds = true
. The ADBannerView
you're seeing at the top of your screen is the ADBannerView
you have created.
Remove self.canDisplayBannerAds = true
from your viewDidLoad
function.