I added the ADBannerView to a view and when I load the app I get the following message:
ADBannerView: WARNING A banner view (0x7a023c0) has an ad but may be obscured. Th
To add to this discussion, I received this message when I modified the center
property to move the ad just outside the screen. I use UIView animations to slide the ad onto the screen.
After some experimenting I figured out how to do this without causing the message to appear. The trick was to hide to set the adBannerView.hidden
property to YES while waiting for the ad to load. Once it was loaded, I just had to make sure to set the hidden property to NO only after committing the animation:
-(void) fadeAdIn:(UIView*)view
{
float offsetY = view.frame.size.height * (bannerOnBottom ? 1 : -1);
CGPoint pos = [self getBannerPosition];
view.center = CGPointMake(pos.x, pos.y + offsetY);
[UIView beginAnimations:@"AdIn" context:nil];
[UIView setAnimationDuration:1.0];
view.center = pos;
[UIView commitAnimations];
// must unhide AFTER animation has been committed to prevent "ad obstructed"
view.hidden = NO;
}