iAdsが広告をロードしないAdsBannerは、アプリストアに公開したときにアプリでのみ白くなりますこれは、私が配置したiAdsのコードです
これは最初のメソッドブロックです
-(void)bannerViewDidLoadAd:(ADBannerView *)banner{
if (self.bannerIsVisible) {
[UIView beginAnimations:@"animateAdBannerOn" context:NULL];
//banner is invisible row and moved out of the screen on 50 px
banner.frame = CGRectOffset(banner.frame, 0, 50);
[UIView commitAnimations];
self.bannerIsVisible = YES;
}
}
これは2番目のメソッドブロックです
-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{
if (self.bannerIsVisible) {
[UIView beginAnimations:@"animateAdBannerOff" context:NULL];
//banner is invisible row and moved out of the screen on 50 px
banner.frame = CGRectOffset(banner.frame, 0, -50);
[UIView commitAnimations];
self.bannerIsVisible = NO;
}
}
これは3番目のメソッドブロックです
-(BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication: (BOOL)willLeave{
NSLog(@"Banner view is beginning an ad action");
BOOL shouldExecuteAction = YES;
if (!willLeave && shouldExecuteAction) {
[UIImageView commitAnimations];
}
return shouldExecuteAction;
}
-(void)bannerViewActionDidFinish:(ADBannerView *)banner{
[UIImageView areAnimationsEnabled];
}