Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11578] iOS: Unable to set ActiveTab on tabGroup

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-06-21T11:44:10.000+0000
Affected Version/sRelease 3.0.0, Release 3.1.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 22 API, 2012 Sprint 22
ComponentsiOS
Labelsapi, module_tabgroup, qe-testadded
ReporterVishal Duggal
AssigneeVishal Duggal
Created2012-10-25T20:17:39.000+0000
Updated2013-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();

Comments

  1. Vishal Duggal 2012-10-25

    PR for master https://github.com/appcelerator/titanium_mobile/pull/3327 PR for 3_0_X https://github.com/appcelerator/titanium_mobile/pull/3328
  2. Natalie Huynh 2012-12-04

    Tested with 3.0.0.v20121130200208 with iPhone 4 5.1.1
  3. Priya Agarwal 2013-06-21

    Reopening just to update label.
  4. Priya Agarwal 2013-06-21

    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

JSON Source