0

I am trying to implement iAD in a game without using deprecated methods. iAD is supposed to detect the orientation automatically to resize the banner but it is displaying the portrait banner when it should be displaying the landscape banner. If anyone could help me out with what I am missing that would be great.

Thanks Guys. Here is some code

self.ad = [[ADBannerView alloc] initWithAdType:ADAdTypeBanner];
self.ad.frame = CGRectZero;
[self.view addSubview:self.ad];

2 Answers2

0

the iAd is only auto-managed when using canDisplayBannerAds.

Check out the question/answer here What does the iAd `UIViewController` category `canDisplayBannerAds` do?

Community
  • 1
  • 1
Jack
  • 16,449
  • 8
  • 47
  • 50
0

I did not think it could resize automatically. I think the latest method to use is sizeThatFits

I have posted some code here

that might help. It provides banner ads in both orientations. Don't forget that full page test ads are landscape only in iPad and portrait only in iPhone. The real ones will work properly.

Community
  • 1
  • 1
Tim
  • 1,068
  • 12
  • 24