我在UIViewController中使用代码来显示GADBannerView,如下所示
self.adBanner = [[GADBannerView alloc]
initWithFrame:CGRectMake(0.0,
self.view.frame.size.height -300-
GAD_SIZE_320x50.height,
320,
35)];
self.adBanner.delegate = self;
self.adBanner.adUnitID = MY_BANNER_UNIT_ID;
self.adBanner.rootViewController = self;
[self.view addSubview:self.adBanner];
GADRequest * request = [GADRequest request];
request.testing = YES;
[self.adBanner loadRequest:request];
这是一个adBanner,但是可以在同一个控制器中添加其他GADBannerView。它应该如下所示
.......................................
. GADBannerView1 .
. .
.......................................
.......................................
. GADBannerView2 .
. .
.......................................
这两者必须在一个屏幕上显示,所以我该怎么做?