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