var self = Ti.UI.createWindow({ title:title, backgroundColor:'white' }); var tb1 = Titanium.UI.iOS.createTabbedBar({ labels:['METRIC', 'STANDARD'], backgroundColor:'#336699', top:150, style:Titanium.UI.iPhone.SystemButtonStyle.BAR, height:25, width:180, index: 0 }); self.add(tb1); tb1.addEventListener('click', function(e){ if (e.index==0) { metric(); }; if (e.index==1) { standard(); }; }); function metric(){ weightlabel.text='Kg'; heightlabel.text='Cms'; } function standard(){ weightlabel.text='Pounds'; heightlabel.text='Inches'; }Both the options are getting selected when we run this code
↧
TABBED BAR ABNORMAL BEHAVIOUR
↧