Problem to set only one view shouldAutorotateToInterfaceOrientation

Discussion in 'iOS Programming' started by cthesky, Dec 10, 2011.

  1. cthesky macrumors member

    Joined:
    Aug 21, 2011
    #1
    Hi all,

    I have some views in my Iphone Application. But I need set only one of the view (for example: ThirdViewController) can autorotate to interface orientation. So, I set shouldAutorotateToInterfaceOrientation to YES in the ThirdViewController, but it seems not work ... So, I try set shouldAutorotateToInterfaceOrientation to YES in root view. It seems can work but is all views in my application become can autorotate to interface orientation. But what I need is just one view (ThirdViewController) can be autorotate. This ThirdViewController is a UINavigationController and I display it through presentModalViewController when press a button.

    Anyone have any ideas to do this? Am I doing something wrong? Any comments and ideas are welcome.

    Thanks a lot. :)
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    I have had some issues with that too, I think there is some topic in the HIG about that. that's it's just not allowed..
    That if you decide to do some views landscape too, that you need to do it for all.
    But I think this has changed, so don't count completely on it.
     
  3. Scott90 macrumors 6502

    Joined:
    Jul 14, 2008
    #3
    If one of your view controllers supports landscape orientation, they all must. At least, that's how it works in a tab bar controllers.
     

Share This Page