Created
May 3, 2012 21:13
-
-
Save egomez99/2589557 to your computer and use it in GitHub Desktop.
iOS: Navgroup Closing window
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Titanium.UI.createWindow(); | |
var win1 = Titanium.UI.createWindow({ | |
backgroundColor:"red", | |
title:"Red Window" | |
}); | |
win1.addEventListener('click', function(){ | |
nav.open(toolsWindow); | |
}); | |
var nav = Titanium.UI.iPhone.createNavigationGroup({ | |
window: win1 | |
}); | |
var toolsWindow = Ti.UI.createWindow({ | |
title: 'Blue Window', | |
url: 'tools_window.js', | |
nav: nav, | |
exitOnClose: false, | |
backgroundColor: 'blue' | |
}); | |
win.add(nav); | |
win.open(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.currentWindow; | |
var button = Ti.UI.createButton({ | |
title: 'close', | |
height: 40, | |
width: 300 | |
}); | |
button.addEventListener('click', function(e) { | |
Ti.API.info('clicked close'); | |
win.nav.close(win); | |
}); | |
win.add(button); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment