0

I made an app which needs to be only in portrait orientation.

I set up portrait in the Plist file, in the Project Infos, I tried everything, but my app still changes orientation. My app is using an ShSideBarController in Appdelegate and then 4 views, which are tableviewcontroller.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38

1 Answers1

1

Try to put this code in your viewcontrollers:

//for iOS6   
 -(NSUInteger)supportedInterfaceOrientations
    {
            return UIInterfaceOrientationMaskPortrait;
      }


    -(BOOL) shouldAutorotate
    {
        return YES;
    }
TonyMkenu
  • 7,597
  • 3
  • 27
  • 49