2012-05-09 77 views
1

成癮者不會加載廣告 的AdsBanner只有白色與我的應用程序時,我把它發佈到AppStore的 這是網絡成癮者的代碼,我把網絡成癮不加載廣告

這是第一種方法方框

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

} 
+1

難道您在iTunes Connect中設置了iAds的應用程序? –

+0

如何設置? – Youstanzr

+0

我的應用程序有同樣的事情。 https://itunes.apple.com/in/app/ui-maker-design-mobile-app/id791072042?mt=8。我已經使用iAds的Delegate方法來顯示何時加載First Ad,直到我保持iAds隱藏。我又重新驗證iTunes上的連接..仍然沒有成功... – DShah

回答

2

點擊您的應用程序在iTunes Connect的 「管理應用程序」 部分中,點擊 「創建iAd網絡」

enter image description here

+0

的話,我已經將它設置它來到了1次,並沒有來到100 – Youstanzr

+0

我的應用程序具有同樣的事情。 https://itunes.apple.com/in/app/ui-maker-design-mobile-app/id791072042?mt=8。我已經使用iAds的Delegate方法來顯示何時加載First Ad,直到我保持iAds隱藏。我再次在iTunes連接上再次驗證..仍然沒有成功... – DShah