AlmaR
Lost but trying
Profile
Posts: 73
Reg: Jun 13, 2011
location unknow...
5,630
03/27/13 09:21 AM (12 years ago)

Admob in Landscape Mode on iOS app

Hey guys! I am using Xcode 4.6.1 and AdMob iOS SDK 6.3 and I have successfully implemented Admob in my BT 2.0 iPhone and iPad app using @tonycelestino's tuto and some tweaks. The ads are showing great on Portrait mode but they are not displaying in Landscape mode, this is my code: -(void)createAdBannerView{ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { // iphone banner begins bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(0.0, self.view.frame.size.height - GAD_SIZE_320x50.height -92, GAD_SIZE_320x50.width, GAD_SIZE_320x50.height)]; bannerView_.adUnitID = @"XXXXXXX"; bannerView_.rootViewController = self; [self.view addSubview:bannerView_]; [bannerView_ loadRequest:[GADRequest request]]; } else { // ipad banner begins bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(20, self.view.frame.size.height - GAD_SIZE_728x90.height -92, GAD_SIZE_728x90.width, GAD_SIZE_728x90.height)]; bannerView_.adUnitID = @"XXXXX"; bannerView_.rootViewController = self; [self.view addSubview:bannerView_]; [bannerView_ loadRequest:[GADRequest request]]; } [bannerView_ release]; } Any ideas on how to make it work when you rotate the device? I have been trying to use a Smart Banner but I couldn't make it work: http://googleadsdeveloper.blogspot.com.ar/2012/06/keeping-smart-banner-docked-to-bottom.html Here is the tuto that I used: http://www.buzztouch.com/forum/thread.php?tid=B533B9AE10D8EA7BD41CEC5&command=isSearching&currentPage=1&topicTitle=admob&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory=
 
AlmaR
Lost but trying
Profile
Posts: 73
Reg: Jun 13, 2011
location unknow...
5,630
like
04/04/13 02:39 PM (12 years ago)
Anyone? Is there any other way to implement admob in iOS apps?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.