// Initialize the banner at the bottom of the screen.
CGPoint origin = CGPointMake(0.0,
self.view.frame.size.height -
CGSizeFromGADAdSize(kGADAdSizeBanner).height);
// Use predefined GADAdSize constants to define the GADBannerView.
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner
origin:origin]
;
// Note: Provide a definition for ADMOB_ID
// before compiling.
bannerView_.adUnitID = ADMOB_ID;
[bannerView_ setRootViewController:self];
[self.view addSubview:bannerView_];
[bannerView_ loadRequest:[GADRequest request]];
Comments
Post a Comment