to support autorotations in ios5 and ios6, we need to provide callbacks in case of ios6 .... `[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil];
and we need to call
- (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait;
}
-(BOOL)shouldAutoRotate{ return YES; }
for ios5
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{return ((toInterfaceOrientation == UIInterfaceOrientationPortrait) || (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)); }
source share