Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)displayAdmobAd
- {
- iSitesNavigationController *controller=(iSitesNavigationController *)self.navigationController ;
- BOOL isLandScape=[[(iSitesNavigationController *)self.navigationController appDelegate] isDeviceInLandScapeMode];
- if(!isLandScape)
- {
- // get the view frame
- CGRect frame = self.view.frame;
- UIView *adMobAd=[(iSitesNavigationController *)self.navigationController adMobAd];
- self.isAdBannerAvailable=YES;
- // put the ad at the bottom of the screen
- [adMobAd setFrame:CGRectMake(0, frame.size.height - 50, frame.size.width, 50)];
- [adMobAd setTag:ADMOB_VIEW_TAG];
- [self.view addSubview:adMobAd];
- self.webView.frame=CGRectMake(0, 0, self.webView.frame.size.width, self.view.frame.size.height-50);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement