iAds无法加载广告 当我将它发布到appstore时,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];
}
答案 0 :(得分:2)
在“管理您的应用程序”部分中单击iTunes Connect中的应用程序,然后单击“设置iAd网络”