0

I'm trying to get my view controller to rotate, but I can't get it to work. I've added these two methods:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    return YES; //iOS 5
}

- (BOOL)shouldAutorotate
{
    return YES; //iOS 6
}

And the second (im using ios6) is indeed getting called, but no rotation is occurring. Why is this?

Thank!

Sean Danzeiser
  • 9,141
  • 12
  • 52
  • 90

1 Answers1

0

Also implement this on ios6:

- (NSUInteger) supportedInterfaceOrientations
{
   return UIInterfaceOrientationMaskAll; 
}

This post was super useful for me to support both ios5 and 6: auto-rotation in iOS5/6?

Community
  • 1
  • 1
Edwin Iskandar
  • 4,119
  • 1
  • 23
  • 24