[TIMOB-11578] iOS: Unable to set ActiveTab on tabGroup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-06-21T11:44:10.000+0000 |
Affected Version/s | Release 3.0.0, Release 3.1.0 |
Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 22 API, 2012 Sprint 22 |
Components | iOS |
Labels | api, module_tabgroup, qe-testadded |
Reporter | Vishal Duggal |
Assignee | Vishal Duggal |
Created | 2012-10-25T20:17:39.000+0000 |
Updated | 2013-06-21T11:44:10.000+0000 |
Description
Test Code
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
icon:'KS_nav_views.png',
title:'Tab 1',
window:win1
});
var label1 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 1',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
win1.add(label1);
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
backgroundColor:'#fff',
navBarHidden: true
});
var tab2 = Titanium.UI.createTab({
icon:'KS_nav_ui.png',
title:'Tab 2',
window:win2
});
var label2 = Titanium.UI.createLabel({
color:'#999',
text:'I am Window 2',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'auto'
});
win2.add(label2);
//
// add tabs
//
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
//Neither of these is working
//tabGroup.setActiveTab(tab2);
tabGroup.setActiveTab(1);
// open tab group
tabGroup.open();
PR for master https://github.com/appcelerator/titanium_mobile/pull/3327 PR for 3_0_X https://github.com/appcelerator/titanium_mobile/pull/3328
Tested with 3.0.0.v20121130200208 with iPhone 4 5.1.1
Reopening just to update label.
Updated label and verified. Tested on: Device: Simulator 6.0 SDK:3.1.2.v20130619101604 Appcelerator Studio: 3.1.1.201306131423 OS: OSX 10.8 acs:1.0.3 alloy:1.1.3 npm:1.2.14 titanium:3.1.1 titanium-code-processor:1.0.1