I have a login which in case of success loads another controller/view main. I'd like to transition between the windows but I don't know if the index stays or if it should stay?
index.xml
<Alloy> <NavigationWindow id="win1" platform="ios"> <Window id="win2"> <Button id="button" onClick="doLogin">Login</Button> </Window> </NavigationWindow> </Alloy>index.js before
function doLogin() { var main = Alloy.createController('main').getView(); main.open(); $.login.close(); //here the login gets closed } $.login.open();index.js after
function doLogin() { var main = Alloy.createController('main').getView(); var t = Ti.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT; $.login.animate({view:main,transition:t}); //$.login.close(); //if I close login the main is gone as well. But if I don't close it it stays, right? Am I doing the transition right? } $.login.open();