What function is called when iAd closes?

Discussion in 'iPhone/iPad Programming' started by Danneman101, Apr 16, 2011.

  1. macrumors 6502

    Joined:
    Aug 14, 2008
    #1
    I've got an iAd in my iPad app (just dragged and dropped in xib, and then linked to IBOutlet to code) that once the user opens and closes it, an item also disappears from view (segmentbuttons that are set up via code).

    If I could just intercept the code when it closes the iAd I could reinstantiate the buttons, so my question is what function is called when the user closes the iAd?
     
  2. macrumors regular

    Joined:
    Aug 26, 2010
    #2
    You may want to read over https://developer.apple.com/library...Experience/Conceptual/iAd_Guide/iAd_Guide.pdf
     
  3. thread starter macrumors 6502

    Joined:
    Aug 14, 2008
    #3
    I should have said that I've tried the bannerViewActionDidFinish-function, but when dismissing the iAd it isn't called.

    Perhaps the problem is that I'm using it incorrectly if that is indeed the function to be used.

    .h-fil
    Code:
    #import <iAd/ADBannerView.h>
    #import <iAd/iAd.h>
    
    @interface DetailViewController : UIViewController <UIPopoverControllerDelegate, UISplitViewControllerDelegate, UIWebViewDelegate, ADBannerViewDelegate> 
    {
        IBOutlet ADBannerView *addBannerView;  // LINKED IN NIB-FILE
    }
    @property (nonatomic, assign) IBOutlet ADBannerView *addBannerView;
    
    .m-file
    Code:
    ......
    @synthesize addBannerView;
    .....
    -(void)bannerViewActionDidFinish:(ADBannerView *)addBannerView
    {
        NSLog(@"- IAD STOPPED -");  // NOT REACHED
    }
    
     

Share This Page