"Methods to support orientation in iOS 6 SDK"

Wed 31 October 2012

 

//For UIViewController's

- (BOOL)shouldAutorotate {

    return YES;

}

 

- (NSUInteger)supportedInterfaceOrientations {

    return UIInterfaceOrientationMaskAllButUpsideDown;

}

 

//For Delegate

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {

    return UIInterfaceOrientationMaskAllButUpsideDown;