To do what you want, you must manually rotate (and resize) your view. There is no property that you can change to do whatever you want. Below is the code for registering device events.
- (void)viewDidLoad { [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil];
I believe that you should completely remove the shouldAutoRotateToInterfaceOrientation: function. You must also call [[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications]; when your view is unloaded.
source share