Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

iPad orientation change issue

Hey there, I'm using the same example from KitchenKink for orientarion purpose, in iPhone it work great, but no on Ipad application.

Anyone have a similar issue ? or already noted this and found some fix ?.

Thanks in advanced, here's the code anyway:


— asked June 1st 2010 by Esteban Fernandez
  • ipad
  • mobile
  • orientation

2 Answers

  • Accepted Answer

    The orientation change event is being fired, but the properties of the event are a bit different on iPad. e.orientation is the piece of data that will be useful - it is an integer which represents one of the available 4 orientations:

    • e.orientation == 1 (portrait)
    • e.orientation == 2 (upside down)
    • e.orientation == 3 (landscape, home button right)
    • e.orientation == 4 (landscape, home button left)
    — answered June 4th 2010 by Kevin Whinnery
    1 Comment
    • Kevin, thanks for ask, i just changed the function to this:

          // device orientation
          l.text = 'Current Orientation: ' + e.orientation;
          Titanium.API.info("orientation changed = "+ e.orientation);

      But in the debug screen doesn't show any of those. I'm missing something ? thanks in advanced.

      — commented June 4th 2010 by Esteban Fernandez
  • Anyone got this issue get?

    — answered June 4th 2010 by Esteban Fernandez
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.