Skip to content

Instantly share code, notes, and snippets.

@nazrdogan
Created April 27, 2014 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nazrdogan/11344626 to your computer and use it in GitHub Desktop.
Save nazrdogan/11344626 to your computer and use it in GitHub Desktop.
Titanium Mobile Navigation ios
var win2 = Titanium.UI.createWindow({
backgroundColor: 'red',
title: 'Red Window'
});
var win1 = Titanium.UI.iOS.createNavigationWindow({
window: win2
});
var win3 = Titanium.UI.createWindow({
backgroundColor: 'blue',
title: 'Blue Window'
});
var button = Titanium.UI.createButton({
title: 'Open Blue Window'
});
button.addEventListener('click', function(){
win1.openWindow(win3, {animated:true});
});
win2.add(button);
var button2 = Titanium.UI.createButton({
title: 'Close Blue Window'
});
button2.addEventListener('click', function(){
win1.closeWindow(win3, {animated:false}); //win3.close() will also work!!
});
win3.add(button2);
win1.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment