return to previous window

You must Login before you can answer or comment on any questions.

I tried to set a path like the webview, but doesn't work..

var left = Ti.UI.createButton({
            title : 'Back',
            height : 50,
            width : 180,
            style:Titanium.UI.iPhone.SystemButtonStyle.BORDERED
    });
 
    left.addEventListener('click',function(e){
        url = Titanium.Filesystem.resourcesDirectory + "/ui/common/HomeContent.js";
        url.open();
    });
 
    win3.leftNavButton = left;
How do I get back to the previous screen? To create a back button design like the system back button, the only option is to create the button as polygon?? Thanks!

1 Answer

One approach would be to have a stack of the windows you have opened. Simply put, everytime you open a window, simply push it in your stack.

So if your user decides to go 4 levels back (a home button for example). You simple loop through the array in reverse and close each of the opened window using the close function.

Your Answer

Think you can help? Login to answer this question!