Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-30-2010, 05:14 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: MA
Posts: 126
nd049 is on a distinguished road
Default iAd's not showing correctly in Landscape

So i've recently started using iAd's in some of my applications, but this week while working on a new app i've come across a strange problem. When I am in Interface builder I add an iAd to the layout and it looks like this...



But then while running the app in the iPhone simulator or on an actual device I'm getting:



I've tried re-adding the iAd to the layout, and I am importing the iAd framework into my code but it is not showing up correctly! I can't figure it out so if anybody could help me out I would appreciate it a lot.

Last edited by nd049; 08-30-2010 at 05:19 PM.
nd049 is offline   Reply With Quote
Old 08-31-2010, 08:16 AM   #2 (permalink)
Registered Member
 
Join Date: Jan 2010
Location: MA
Posts: 126
nd049 is on a distinguished road
Default

Bump.
nd049 is offline   Reply With Quote
Old 08-31-2010, 08:28 AM   #3 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 24
kimor is on a distinguished road
Default

Which setting did you use for the banner? 320x50 or 480x320?
kimor is offline   Reply With Quote
Old 08-31-2010, 08:33 AM   #4 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 138
SpaceAce is on a distinguished road
Default

Quote:
Originally Posted by nd049 View Post
Bump.
You need to check the orientation and set the adBanner correctly.

Code:
[adBannerView setRequiredContentSizeIdentifiers:[NSSet setWithObjects: 
      ADBannerContentSizeIdentifier320x50, 
      ADBannerContentSizeIdentifier480x32, 
      nil]];

if (UIInterfaceOrientationIsLandscape([UIDevice currentDevice].orientation)) 
 {
    [adBannerView setCurrentContentSizeIdentifier: ADBannerContentSizeIdentifier480x32];
    bannerHeight = 32;
  } 
else 
  {
    [adBannerView setCurrentContentSizeIdentifier:ADBannerContentSizeIdentifier320x50];
    bannerHeight = 50;  
  }
The set the according frame using the setFrame-method for the banner.
Ray Wenderlich has a good tutorial for this, just search for it on Google.

Last edited by SpaceAce; 08-31-2010 at 08:37 AM.
SpaceAce is offline   Reply With Quote
Reply

Bookmarks

Tags
iad, landscape

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 354
6 members and 348 guests
dre, freewind, hain, HemiMG, lendo, Newbie123
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,118
Posts: 402,894
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:00 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0