I set supported Interface Orientations to be all except Portrait upside down under Deployment Info.
I would like to override shouldAutorotateToInterfaceOrientation: for
was using ios6
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
is deprecated on ios6
Its Working for me:
- (BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
NSUInteger orientations = UIInterfaceOrientationMaskPortrait;
if ([self isKindOfClass:[YourViewController class]]) { // Your view class
orientations |= UIInterfaceOrientationMaskPortraitUpsideDown;
}
return orientations;
}
orientations:
orientations |= UIInterfaceOrientationMaskLandscapeLeft;
orientations |= UIInterfaceOrientationMaskLandscapeRight;