Easy way to do this

Discussion in 'iOS Programming' started by arnieterm, Nov 26, 2009.

  1. arnieterm macrumors regular

    Aug 28, 2008
    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
    - (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.
  2. ghayenga macrumors regular

    Jun 18, 2008
    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