iAds有时在应用中显示为白框吗? [英] iAds sometime appearing as white boxes in app?

查看:70
本文介绍了iAds有时在应用中显示为白框吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我有一个需要互联网的应用程序,而首先,如果用户没有互联网功能,该应用程序将显示黑屏并显示错误警报. 因此,iAds应该始终显示,因为使用该应用程序的用户应始终具有互联网功能,否则该视图将无法加载.但是有时候,当我测试应用程序时,iAd的每4-5倍就会出现一个白框.有时,在应用程序的中间,当我将iAd移动到其他位置时,它也会变成白框.我实际上对此没有太多问题,但是我想知道这种奇怪的行为是否会使我的应用程序被拒绝.

So, I have an app that requires internet, and one the beginning, if the user doesn't have internet capabilities, the app shows a blank screen with an error alert. So, iAds should always appear, because the user using the app should alway have internet capabilities, or the view wouldn't load. But sometimes, when I'me testing the app, one out of every 4-5 times the iAd will just come as a white box. Sometimes, in the middle of the app, when I move the iAd to a different position, it also becomes a white box. I actually don't have too much of a problem with this, but I wanted to know if this weird behavior could get my app rejected.

注意:我已经包含了方法:

Note: I HAVE included the method:

-(void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error{
    if (self.bannerIsVisible) {
        [UIView beginAnimations:@"animateAdBannerOff" context:NULL];
        banner.frame = CGRectOffset(banner.frame, 0, -50);
        [UIView commitAnimations];
        self.bannerIsVisible = NO; 
    }
}

推荐答案

如果未成功加载,则您的方法会将iAd横幅广告向上移动50像素.因此,如果您的横幅广告最初是放置在屏幕底部的,则只会向上移动(负载不成功)-因此仍然可以看到(如白框).

Your method moves iAd banner for 50 px upwards if it's not loaded successfully. So if your banner is originally placed on the bottom of the screen it will only be moved upwards (at unsuccessfull load) - thus it will still be visible (as a white box).

最好为已装载/未装载的横幅广告提供固定位置.

You'd be better of providing a fixed positions for loaded/unloaded banners.

请参阅 xcode 4.3-故事板-iAd上的已接受答案不断前进

这篇关于iAds有时在应用中显示为白框吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆