> How to properly add iAds to your app?

How to properly add iAds to your app?

Posted at: 2014-06-09 
Hi. I'm somewhat new to the whole iOS development thing here, and I'm currently in the middle of making my newest game, but after playing the game for a few minutes, the app lags a WHOLE lot. Right before it starts lagging terribly, I get a warning in the console that says: "WARNING: More than 10 instances of ADBannerView or ADInterstitialView currently exist. This is a misuse of the iAd API, and ad performance will suffer as a result." I'm taking a guess to say that this is the cause of the lag. To many instances of the ADBanner open at once. How do I close an instance before a new one opens? My current iAd code is In my .h file: #import <iAd/iAd.h> <ADBannerViewDelegate> @property (nonatomic,assign) BOOL bannerIsVisible; and in my .m file: #pragma mark iAd Delegate Methods -(void)bannerViewDidLoadAd:(ADBannerVie... *)banner{ [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1]; [banner setAlpha:1]; [UIView commitAnimations]; } -(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{ [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1]; [banner setAlpha:0]; [UIView commitAnimations]; } Please explain how to fix this very briefly!