title: how to implement AdBannerview and ADBannerview delegate
body: <p>I am having trouble implementing ADBannerView and its delegate protocol. </p>
  
  <p>I implemented the following code in my view class (also made the view conform to the ADBannerViewDelegate protocol):</p>
  
  <pre><code>//add iAds
  ADBannerView *adView = [[ADBannerView alloc] initWithFrame: CGRectMake(0, 318, 320, 50)];
  adView.requiredContentSizeIdentifiers = [NSSet setWithObjects: ADBannerContentSizeIdentifierPortrait, ADBannerContentSizeIdentifierLandscape, nil];
  adView.delegate = self; 
  //adView.delegate = ADBannerViewDelegate;
  [self.view addSubview: adView];
  </code></pre>
  
  <p>then I created a class for the ADBannerViewDelegate, with the following .m</p>
  
  <pre><code>//
  //  ADBannerViewDelegate.m
  //
  
  #import "ADBannerViewDelegate.h"
  
  @implementation ADBannerViewDelegate
  
  - (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{
      NSLog(@"bannerview did not receive any banner due to %@", error);}
  
  - (void)bannerViewActionDidFinish:(ADBannerView *)banner{NSLog(@"bannerview was selected");}
  
  - (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave{return willLeave;}
  
  - (void)bannerViewDidLoadAd:(ADBannerView *)banner {NSLog(@"banner was loaded");}
  
  @end
  </code></pre>
  
  <p>the banners are eventually presented but the console keep throwing the following type of errors:</p>
  
  <pre><code>2011-02-27 15:00:54.108 app[31639:207] ADBannerView: Unhandled error (no delegate or delegate does not implement didFailToReceiveAdWithError:): Error Domain=ADErrorDomain Code=5 "The operation couldn’t be completed. Banner view is visible but does not have content" UserInfo=0x6356a40 {ADInternalErrorCode=5, NSLocalizedFailureReason=Banner view is visible but does not have content}
  </code></pre>
  
  <p>and the delegate functions are not doing anything , so no NSLog at all. Obviously not catching the errors.</p>
  
  <p>I am stumped. I guess I am missing something in the linkage of the Adbanner view calls in the view and the delegate. Not sure how to do it or what is wrong.</p>
  
  <p>Any help? Thanks in advance.</p>
  
  <p>Jason</p>