Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-11578

iOS: Unable to set ActiveTab on tabGroup

    Details

      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();
      

        Issue Links

          Activity

          Show
          Vishal Duggal added a comment - PR for master https://github.com/appcelerator/titanium_mobile/pull/3327 PR for 3_0_X https://github.com/appcelerator/titanium_mobile/pull/3328
          Hide
          Natalie Huynh added a comment -

          Tested with 3.0.0.v20121130200208 with iPhone 4 5.1.1

          Show
          Natalie Huynh added a comment - Tested with 3.0.0.v20121130200208 with iPhone 4 5.1.1
          Hide
          Priya Agarwal added a comment -

          Reopening just to update label.

          Show
          Priya Agarwal added a comment - Reopening just to update label.
          Hide
          Priya Agarwal added a comment -

          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

          Show
          Priya Agarwal added a comment - 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

            People

            • Assignee:
              Vishal Duggal
              Reporter:
              Vishal Duggal
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development