Skip to content

Instantly share code, notes, and snippets.

@minhnc
Created March 13, 2012 13:31
Show Gist options
  • Save minhnc/2028760 to your computer and use it in GitHub Desktop.
Save minhnc/2028760 to your computer and use it in GitHub Desktop.
TabGroup
var tg = Ti.UI.createTabGroup();
var win1 = Ti.UI.createWindow({backgroundColor: 'white'});
var t1 = Ti.UI.createTab({title: 'Tab 1', window: win1});
var win2 = Ti.UI.createWindow({backgroundColor: 'red'});
var t2 = Ti.UI.createTab({title: 'Tab 2', window: win2});
var win3 = Ti.UI.createWindow({backgroundColor: 'blue'});
var t3 = Ti.UI.createTab({title: 'Tab 3', window: win3});
var win4 = Ti.UI.createWindow({backgroundColor: 'green'});
var t4 = Ti.UI.createTab({title: 'Tab 4', window: win4});
var win5 = Ti.UI.createWindow({backgroundColor: 'yellow'});
var t5 = Ti.UI.createTab({title: 'Tab 5', window: win5});
tg.addTab(t1);
tg.addTab(t2);
tg.addTab(t3);
tg.addTab(t4);
tg.addTab(t5);
tg.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment