0

I've just started encorporating ADBannerView into my application and everything works as I expected it, within exception of when flipping Simulator (or iPhone) to landscape view, the ad view is white space. When I flip it back to portrait mode, its showing the test ad again.

Here is the code where I'm flipping the ADBannerView:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
    if(UIInterfaceOrientationIsPortrait(toInterfaceOrientation)){
        adBannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
    }
    else{
        adBannerView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier480x32;
    }

    return YES;
}

I've also tried doing the same in willRotateToInterfaceOrientation method with same result.

Is there a step that I'm missing?

sch
  • 27,436
  • 3
  • 68
  • 83
Leo L
  • 59
  • 2
  • Nevermind. I figured out that the problem had to do with repositioning of the AdBannerView after rotating to landscape view. – Leo L Apr 03 '12 at 15:27
  • just try this before if condition adBannerView.requiredContentSizeIdentifiers = [NSSet setWithObject:UIInterfaceOrientationIsLandscape(viewOnWhichToShow.interfaceOrientation)?ADBannerContentSizeIdentifierLandscape:ADBannerContentSizeIdentifierPortrait]; – Srikanth Aug 03 '12 at 05:32

0 Answers0