1

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;

}

}

这是第二个方法块

-(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;

}

}

这是第三个方法块

-(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];

}
4

1 回答 1

2

在 iTunes Connect 中的“管理您的应用程序”部分中单击您的应用程序,然后单击“设置 iAd 网络”

在此处输入图像描述

于 2012-05-12T16:58:14.633 回答