My app was recently rejected after implementing iAd support. The email I received back stated I needed to hide the view when no ad was present. The following was provided:
I tried adding that to my main view controller that contains the ad view and received many compile error messages. What would be the proper way of hiding the ads?
EDIT: Yes I am compiling with the most recent SDK and I have included the iAd framework
Banner View Delegate to Remove a Banner View When Advertisements are Not Available:
- (void)bannerViewADBannerView *)banner didFailToReceiveAdWithError
NSError *)error
{
if (self.bannerIsVisible)
{
[UIView beginAnimations"animateAdBannerOff" context:NULL];
// assumes the banner view is at the top of the screen.
banner.frame = CGRectOffset(banner.frame, 0, -50);
[UIView commitAnimations];
self.bannerIsVisible = NO;
}
}
I tried adding that to my main view controller that contains the ad view and received many compile error messages. What would be the proper way of hiding the ads?
EDIT: Yes I am compiling with the most recent SDK and I have included the iAd framework