Im developing an application using Titanium which is compatible for iPhone. I'm navigating between 4 views. 1st View (Portrait) ---> 2nd View (Landscape) --> 3rd View (Portrait) ---> 4th View (Portrait) SO I have 3 Portrait views in my application and I used Tiapp.xml and add
<orientations device="iphone">
<orientation>Ti.UI.PORTRAIT</orientation>
</orientations>
For 2nd View I used following code ;
var winCheckInLogin = Ti.UI.createWindow({
backgroundColor : "black",
orientationModes : [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT],
navBarHidden : true, // Hides the native title bar
});
winCheckInLogin.addEventListener("open", function() {
Titanium.UI.orientation = Titanium.UI.LANDSCAPE_LEFT;
});
But for the loading time 2nd View appear on Portrait mode after I rotate my device it keep it as Landscape. I need to load it as Landscape mode and lock that screen as it is.
Please help me to solve this.
Thanks a lot