i'm working on a ios app that is so structured:
mainNavigation(navigation controller for mainapp-login)->tabBarController(3 tab bar item)->NavigationController(navigation contronoller for every tab bar item).
I want add admob in the top of my app(in the top of my navigation bar...). In my viewDidLoad of a tab bar item, i did this:
- (void)viewDidLoad
{
[super viewDidLoad];
//bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
bannerView_ = [[GADBannerView alloc]
initWithFrame:CGRectMake(0.0,
70.0 -
GAD_SIZE_320x50.height,
GAD_SIZE_320x50.width,
GAD_SIZE_320x50.height)];
// Specify the ad's "unit identifier". This is your AdMob Publisher ID.
bannerView_.adUnitID = @"ID";
bannerView_.rootViewController = self;
[self.navigationController.view addSubview:bannerView_];
[bannerView_ loadRequest:[GADRequest request]];
}
The banner, hide the navigation bar, like so: http://cl.ly/image/3C2S0m040O2h Instead if i don't use:
bannerView_ = [[GADBannerView alloc]
initWithFrame:CGRectMake(0.0,
70.0 -
GAD_SIZE_320x50.height,
GAD_SIZE_320x50.width,
GAD_SIZE_320x50.height)];
But use:
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
Look so: http://cl.ly/image/203v1C2W1b2P Instead i want that banner is showed in top, and all content(also the navigation bar)...go below the banner. How i can do ? Thanks, and sorry for my bad english.