see and no see windows on iphone flip
how can i make window not see if i flip iphone?
tnx
2 Answers
-
Accepted Answer
try this:
Ti.Gesture.addEventListener('orientationchange',function(e) { // get orienation from event object var orientation = e.orientation switch (orientation) { case Titanium.UI.PORTRAIT: window1.show(); window2.hide(); win.showNavBar(); break; case Titanium.UI.LANDSCAPE_RIGHT: window1.hide(); window2.show(); win.hideNavBar(); break; case Titanium.UI.LANDSCAPE_LEFT: window1.hide(); window2.show(); win.hideNavBar(); break; } }); win.orientationModes = [ Titanium.UI.PORTRAIT, Titanium.UI.LANDSCAPE_RIGHT, Titanium.UI.LANDSCAPE_LEFT ];
-
tnx worked