In order to do what you want, you must manually rotate (and resize) your view. There is no property you can change to easily do what you wish. Below is the code to register for device rotation events.
- (void)viewDidLoad {
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:)
name:UIDeviceOrientationDidChangeNotification object:nil];
//Whenever the device orientation changes, orientationChanged will be called
}
- (void)orientationChanged:(NSNotification *)notification
{
UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
//Based upon which orientation the device is in, update your View rotations.
//A simple view.transform = CGAffineTransformMakeRotation(whatever); will work well.
}
I believe you should remove the shouldAutoRotateToInterfaceOrientation: function altogether.
You should also call [[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
when your view unloads.