Follow

Advanced Usage - Changing the banner size and origin upon rotation

View original article on our GitHub

If you choose to manually control the banner's size & origin upon rotation, you can do it in the didRotateFromInterfaceOrientation function.

Example:

// YourViewController.m

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
    if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
         [bannerView setOrigin:CGPointMake(0, 0)];
    } else {    
        [bannerView setOrigin:CGPointMake(0, 300)];
    }
    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
}

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments