1

Right now I have an iAd banner on the bottom of my view when the device is in landscape. How do I get the iAd banner to be on top of the view when the device is in landscape?

banner.frame = CGRectOffset(banner.frame, -banner.frame.size.width/50, -banner.frame.size.height);
Daniel Storm
  • 18,301
  • 9
  • 84
  • 152

2 Answers2

0
 Banner.frame = CGRectMake(0,0,480,32);

is the solution

0

You should not be setting static points for your ADBannerView. What happens when you run your application on a device that has different screen dimensions?

What you should be doing is setting your ADBannerView's frame relative to the UIView it is displayed within, like so:

iAdBannerView.frame = CGRectMake(0, 0, self.view.frame.size.width, iAdBannerView.frame.size.height);

Read the answers to this question, UIView frame, bounds and center, for a better understanding of what frame refers to exactly.

Community
  • 1
  • 1
Daniel Storm
  • 18,301
  • 9
  • 84
  • 152