简体   繁体   English

iAd无法使广告外观动起来

[英]iAd Doesn't Animate Ad Appearance

I'm implementing iAd in my app using the paradigms for a multi-VC app that apple demonstrates in their sample code (eg TabbedBanner and NavigationBanner). 我正在使用Apple在示例代码(例如TabbedBanner和NavigationBanner)中演示的多VC应用程序的范例在我的应用程序中实现iAd。 If you're not familiar with it, the paradigm is essentially to have the main app delegate serve as the primary AdBannerViewDelegate, and share the banner view across your respective view controllers. 如果您不熟悉该范式,则本质上是将主应用程序委托作为主要AdBannerViewDelegate,并在各自的视图控制器之间共享横幅视图。

My ads are appearing fine throughout the app, without any warnings. 我的广告在整个应用中都正常显示,没有任何警告。 The problem is that for some reason when I click an ad banner, it doesn't navigate the appearance of the ad (should slide up from the bottom). 问题是由于某种原因,当我单击广告横幅时,它无法导航广告的外观(应从底部向上滑动)。 There's just a delay and then the ad appears. 只是延迟,然后广告出现了。 But when I dismiss the ad it animates fine. 但是当我关闭广告时,动画效果很好。

The appearance animates fine in apple's sample code, so the problem lies somewhere in my code. Apple的示例代码中的外观动画效果很好,因此问题出在我的代码中。 I'm just not sure where because I haven't changed much in the iAd implementation. 我只是不确定,因为我在iAd实施中没有做太多更改。 My bannerViewActionShouldBegin is just 我的bannerViewActionShouldBegin只是

- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave
{
    [[NSNotificationCenter defaultCenter] postNotificationName:BannerViewActionWillBegin object:self];
    return YES;
}

But I don't think the problem lies in the NotificationCenter, because if I comment out that bit and just do 但是我不认为问题出在NotificationCenter上,因为如果我注释掉那一点然后做

- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave
{
    return YES;
}

The problem remains. 问题仍然存在。

Any ideas? 有任何想法吗? I can post more code, but my digging around in the documentation hasn't revealed anything that would flip an animated BOOL for ad presentation. 我可以发布更多代码,但是我在文档中进行的挖掘并没有发现任何会翻转animated BOOL进行广告展示的内容。

Thanks in advance. 提前致谢。

FWIW, the best I could figure is that this seems to simply be an iOS version issue. FWIW,据我所知,这似乎只是一个iOS版本的问题。 In 4.0 it fails to animate. 在4.0中,无法进行动画处理。 In 5.0 it animates. 在5.0中会进行动画处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM