I am very new to titanium when i am trying to exit from the application by clicking the button it displays the titanium splash screen again!!
I am using the following code
var win=Ti.UI.createWindow({
backgroundColor:'#ddd',
exitOnClose:true
});
var button=Ti.UI.createButton({
title:'back',
left:10,top:10
});
button.addEventListener('click',function(e){
win.close();
});
var text=Ti.UI.createLabel({
text:'Home page',
color:'#000',
font:{ fontSize:20}
});
win.add(button);
win.add(text);
win.open();
How can I exit from the application through button click?