Skip to content

Instantly share code, notes, and snippets.

@pablasso
Created September 1, 2011 19:43
Show Gist options
  • Save pablasso/1187076 to your computer and use it in GitHub Desktop.
Save pablasso/1187076 to your computer and use it in GitHub Desktop.
NavigationController instance
var NavigationController = require('NavigationController').NavigationController;
var nav = new NavigationController();
var tmpWindow = Titanium.UI.createWindow({
backgroundColor:'white',
title:'1st Window'
});
var tmpButton = Titanium.UI.createButton({
title:'Touch me'
});
tmpButton.addEventListener('click', function() {
nav.open(tmpWindow2);
});
tmpWindow.add(tmpButton);
var tmpWindow2 = Titanium.UI.createWindow({
backgroundColor:'blue',
title:'2nd Window'
});
nav.open(tmpWindow);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment