Orientation bug on iPad iOS 5.1.1

Discussion in 'iOS Programming' started by Sven11, Nov 8, 2013.

  1. Sven11 macrumors 6502a

    Joined:
    Sep 25, 2010
    #1
    I've noticed a bug with my app on my mother's old 1st gen iPad running iOS 5.1.1. The app supports 4 orientations and opens normally in portrait mode, but when I switch to landscape mode I can only flip the iPad, but can't go back to any portrait orientation. The problem seems to be on iOS 5.1.1 only since my iPad running iOS 7.0.3 doesn't have that issue, just like every iPad simulator Xcode has to offer.

    I'm using Xcode 5.0.1. I have really no idea what's wrong here.
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    There were changes in how iOS handles orientation changes. I guess those came in iOS 6. Did you remove the code that worked on iOS 5? Things like shouldAutorotateToInterfaceOrientation: are still needed for iOS 5 but not for iOS 6 and later.
     
  3. Sven11 thread starter macrumors 6502a

    Joined:
    Sep 25, 2010
    #3
    Thanks for the reply, I fixed the bug already by adding portrait orientation in a line of code that later iOS versions seem to ignore.
     
  4. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    Right, that's what I said.

    So is this a new app written after iOS 5 was no longer current? Trying to add backward compatibility to an old version of the OS can be hard and certainly requires testing on a real device with the old OS.
     

Share This Page