- (void)bannerViewDidLoadAd:(ADBannerView *)banner
{
if (!self.bannerIsVisible)
{
NSLog(@"bannerViewDidLoadAd -----");
[UIView beginAnimations:@"animateAdBannerOn" context:NULL];
// assumes the banner view is offset 50 pixels so that it is not visible.
banner.frame = CGRectOffset(banner.frame, 0, 50);//50
[UIView commitAnimations];
self.bannerIsVisible = YES;
}
}
- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
{//NSLog(@"didFailToReceiveAdWithError");
if (self.bannerIsVisible)
{
NSLog(@"didFailToReceiveAdWithError");
[UIView beginAnimations:@"animateAdBannerOff" context:NULL];
// assumes the banner view is at the top of the screen.
banner.frame = CGRectOffset(banner.frame, 0, -50);//-50);
[UIView commitAnimations];
self.bannerIsVisible = NO;
}
}