If you're using the demo app, then let's enable all the possible orientations. Make sure our banner adjusts itself accordingly:
1. Open the demo app in Xcode. If you're using your own app that already supports multiple orientations, skip ahead to step 4.
2. To enable our app to know it should spin the view when the device is rotated, we need to modify a simple bit of Objective C. Open the file
iAd_Demo_AppViewController.m
from the project navigator; you'll see the code appear on screen. Find the method(BOOL)shouldAutorotateToInterfaceOrientation
, which should be near the end of the function. This is called by the device when it's rotated and we're able to tell it when it should and shouldn't update the view. Find the following line:return (interfaceOrientation == UIInterfaceOrientationPortrait);
3. At the moment, it checks if the rotation orientation is portrait, and returns
YES
if it is andNO
if it isn't. We're able to override this check and always...