No, im not using admobs with adwhirl, its standalone.
I have a generic function that returns an adview (since i need to
display ad's in several screens).
Here's the code:
- (GADBannerView *)createAdViewController:(UIViewController *)viewCtrl
{
GADBannerView *adMobView = [[GADBannerView alloc]
initWithFrame:CGRectMake(0,0, GAD_SIZE_320x50.width,
GAD_SIZE_320x50.height)];
adMobView.adUnitID = <ad mob publisher id>;
adMobView.rootViewController = viewCtrl;
adMobView.delegate = self;
return [adMobView autorelease];
}
and another function that's called in the cellForRowAtIndexPath
delegate to load the advertisement for the GADBannerView adview
parameter:
- (void)loadAdvertisement:(GADBannerView *)adView{
GADRequest *request = [GADRequest request];
request.testing = YES;
[adView loadRequest:request];