0

我正在使用 AdMob 的中介功能向我的 iPhone 应用程序投放 iAd 和 AdMob 广告。但是,我注意到一些 AdMob 广告真的很烦人......

一些 AdMob 广告直接在我的应用程序内打开网页,位于导航栏和标签栏之间,并且无法正确显示。它们没有像 iAd 那样完全模态化,而是侵入了我的应用程序空间(并且做错了)。

有没有办法挑选出这些 AdMob 广告并仅禁用那些试图在应用网页中打开的广告?我对打开 AppStore 或 Safari 的 AdMob 广告很好。

下面,您可以看到发生的事情之前和之后。

前

后

再一次,这很烦人,因为 iAd 工作得很好,并且表现如预期,模态地占据了整个屏幕。另一方面,AdMob 对其在我的视图层次结构中的位置做出了错误的假设。我可能可以重新设计我的层次结构以“使其工作”,但在我看来,当前的层次结构已经很理想,其他任何东西都会感觉被破解在一起。

如果我无法让 AdMob 正常运行,我的备用计划是简单地禁用 AdMob 广告。

4

1 回答 1

1

您是否正确设置了 BannerView 的 rootViewController?

这是我的一个视图控制器中的 viewDidLoad 方法的摘录...

- (void)viewDidLoad
{
    [super viewDidLoad];

    // Create a view of the standard size at the bottom of the screen.
    // Available AdSize constants are explained in GADAdSize.h.
    _bannerView = [[DFPBannerView alloc] initWithAdSize:kGADAdSizeBanner];
    _bannerView.delegate = self;

    // Specify the ad's "unit identifier." This is your AdMob Publisher ID.
    _bannerView.adUnitID = ADMOB_PUBLISHER_ID;

    // Let the runtime know which UIViewController to restore after taking
    // the user wherever the ad goes and add it to the view hierarchy.
    _bannerView.rootViewController = self;

    // SNIP
}
于 2012-11-07T20:16:16.033 回答