I don’t see that method in there… I just put the iAd banner in using xcode at the top of a drill down table tutorial. I tried it at the top and at the bottom.
It seems to compile and run in the simulator… but I get this error. I’m trying to add iAds to a table view app. Any suggestions would be greatly appreciated?
-(void) bannerViewDidLoadAd:(ADBannerView *)banner{
if (!self.bannerIsVisible)
{
[UIView beginAnimations:@"animateAdBannerOn" context:NULL];
banner.frame = CGRectOffset(banner.frame, 0, -banner.frame.size.height);
[UIView commitAnimations];
self.bannerIsVisible = YES;
}}
-(void) bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error {
if (self.bannerIsVisible)
{
[UIView beginAnimations:@"animateAdBannerOff" context:NULL];
banner.frame = CGRectOffset(banner.frame, 0, banner.frame.size.height);
[UIView commitAnimations];
self.bannerIsVisible = NO;
}}
I had the exact same issue in Xcode 4.2.1 when trying to add ADBannerView to TableView in a nib. It looks like a bug from Xcode or iAd framework.
This can be walkaround by following steps: