0

Possible Duplicate:
shouldAutorotateToInterfaceOrientation is not working in iOS 6

I am using xcode 4.5, I need to enable interface orientation only on one viewController containing a webview in it. How can i enable it.

- (BOOL)shouldAutorotateToInterfaceOrientation seems deprecated in iOS6

Community
  • 1
  • 1
Raheel Sadiq
  • 9,847
  • 6
  • 42
  • 54

2 Answers2

5

Instead you can use this UIViewController

-(BOOL) shouldAutorotate{
        return YES; //supports all
    }

    -(NSUInteger) supportedInterfaceOrientations{

        return UIInterfaceOrientationMaskAllButUpsideDown; //supports all but upside-down
}
NSUserDefault
  • 1,794
  • 1
  • 17
  • 38
1

This API does not works in iOS 6 anymore. There is no way that you can enable it. See the link shared by @Shivan Raptor

Evol Gate
  • 2,247
  • 3
  • 19
  • 37