Autorotate

Discussion in 'iOS Programming' started by nashyo, Jan 18, 2012.

  1. nashyo, Jan 18, 2012
    Last edited: Jan 18, 2012

    nashyo macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #1
    I previously had my app successfully rotating a controller that had a UIimage subview.

    I set the following to yes.

    Code:
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        return YES;
    }
    
    This was all that was required to get rotation to work, in IOS5.

    Since adding a tab bar controller, the rotation has stopped.

    In storyboard, I have set attributes so that the tab bar does not display when the controller is pushed to ImageViewController. I have also enabled the full screen attribute. But still no rotation.

    What could have gone wrong here?
     
  2. nashyo thread starter macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #2
    Got it

    Found the answer.

    If you have a tab bar, you need to set auto rotate to on in the view controllers of both tabs.
     

Share This Page