Created
December 14, 2011 13:34
-
-
Save bytespider/1476580 to your computer and use it in GitHub Desktop.
This file contains 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 tabGroup = Ti.UI.createTabGroup(); | |
var tabsArray = tabGroup.tabs; | |
Object.defineProperty( | |
tabGroup, | |
"tabs", | |
{ | |
get: function () { | |
alert(tabGroup.tabs.length + " tabs"); | |
return tabsArray; | |
}, | |
set: function (tabs) { | |
tabsArray = tabs; | |
} | |
} | |
); | |
// or even | |
tabGroup.addTab = function (tab) { | |
tab.icon = ""; // do funky things with our tab | |
Ti.UI.TabGroup.prototype.addTab.call(tabGroup, tab); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment