gpt4 book ai didi

admob - iOS 7 不支持 admob?

转载 作者:行者123 更新时间:2023-12-04 22:01:12 28 4
gpt4 key购买 nike

这是我的代码:

gAdView=[[GADBannerView alloc] initWithFrame:CGRectMake(0,self.view.bounds.size.height-GAD_SIZE_320x50.height,GAD_SIZE_320x50.width,GAD_SIZE_320x50.height)];
gAdView.adUnitID = admobID;
gAdView.rootViewController=self;
gAdView.delegate = self;
[self.view addSubview:gAdView];
[gAdView loadRequest:[self createRequest]];

它在 iOS 5 和 iOS 6 中运行良好,但在 iOS 7 中不显示?为什么?ADMOB LIB:6.5.1

最佳答案

以下代码适用于 iOS 7,

bannerView_      = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];   
bannerView_.adUnitID = @"your-mediation-id";
bannerView_.rootViewController = self;
bannerView_.frame = CGRectMake(0,518,320,50);
[self.view addSubview:bannerView_];
[bannerView_ loadRequest:[GADRequest request]];

为什么要设置委托(delegate)?

关于admob - iOS 7 不支持 admob?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19042540/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com