Easy way to do this

Discussion in 'iPhone/iPad Programming' started by arnieterm, Nov 26, 2009.

  1. macrumors regular

    Joined:
    Aug 28, 2008
    #1
    For an iphone application, i need to show a screen when the user makes the device landscape and pop this screen when the user makes the device as portrait. I am making use of below given method for doing this
    Code:
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
    
    Is there any other way to force a screen out of several as Landscape and rest other as portrait without using the above given method.
    Thanks
    Arnieterm
     
  2. macrumors regular

    Joined:
    Jun 18, 2008
    #2
    shouldRotate allows you to prevent it from rotating the screen by returning NO or allow it by returning YES.

    The willRotate or didRotate versions are what you need to use to make the changes before or after it has rotated.

    There is no way to force it to rotate from one to the other programmatically if that's what you're asking.
     

Share This Page