Titanium Community Questions & Answer Archive

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

splitwindow force orientation

I'm trying to force a "landscape only" on an splitview( ipad ).
The docs says that the splitwindow inherits its methods and properties from Titanium.UI.Window but it seems "orientations" are not working.
If I do this with a normal window it works - turning the ipad in portrait, the app remains landscape.

    orientationModes:[ Titanium.UI.LANDSCAPE_LEFT,Titanium.UI.LANDSCAPE_RIGHT ],
    detailView:nav,
    masterView:masterView

I also edited the info.plist as said in bug #570.

Thanks for any idea you might have :)

— asked July 9th 2010 by Dan Tamas
  • ipad
  • landscape
  • orientation
  • splitwindow
0 Comments

1 Answer

  • Its an issue of which object do you set this properties to.
    Set it to the splitView object and it worked for me, like this:

    SplitViewNav.splitView = Titanium.UI.iPad.createSplitWindow({
    masterView:SplitViewNav.masterNav,
    detailView:SplitViewNav.detailNav,
    orientationModes:[ Titanium.UI.LANDSCAPE_LEFT,Titanium.UI.LANDSCAPE_RIGHT ]
    });

    — answered November 2nd 2010 by Claudio Del Conde
    permalink
    0 Comments
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.