Skip to content

Instantly share code, notes, and snippets.

@hansemannn
Created March 15, 2016 10:41
Show Gist options
  • Save hansemannn/ab83c7730999b7ea3100 to your computer and use it in GitHub Desktop.
Save hansemannn/ab83c7730999b7ea3100 to your computer and use it in GitHub Desktop.
var win = Ti.UI.createWindow({backgroundColor:"#f00", title: "Red Window"});
var nav = Ti.UI.iOS.createNavigationWindow({window: win});
var trigger = Ti.UI.createButton({
title: "Open Blur Window"
});
win.add(trigger);
trigger.addEventListener("click", function() {
var win2 = Ti.UI.createWindow({
backgroundColor: "#00f",
title: "Blue Window"
});
var list = Ti.UI.createListView();
var section = Ti.UI.createListSection({
items: [{
properties: {title: "List item 1"}
},{
properties: {title: "List item 2"}
},{
properties: {title: "List item 3"}
}]
});
list.setSections([section]);
win2.add(list);
win2.addEventListener("close", function() {
Ti.API.warn("win2 CLOSED");
})
nav.openWindow(win2);
});
nav.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment