Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16628] iOS: Support tintColor of TableViewRow and listItem

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-03-17T20:34:48.000+0000
Affected Version/sn/a
Fix Version/s2014 Sprint 06, 2014 Sprint 06 SDK, Release 3.2.3, Release 3.3.0
ComponentsiOS
LabelsTableViewRow, qe-closed-3.2.3, qe-testadded
ReporterVishal Duggal
AssigneeVishal Duggal
Created2014-03-14T21:40:14.000+0000
Updated2014-06-19T12:43:31.000+0000

Description

Comments

  1. Vishal Duggal 2014-03-14

    Test Case
       Ti.UI.setBackgroundColor('#000');
       var win = Ti.UI.createWindow({
         fullscreen: true,
         orientationModes:[Ti.UI.PORTRAIT]
       });
       
       var data = [
        {title:'Red Tint'},
        {title:'Cyan Tint'},
        {title:'Green Tint'},
        {title:'NULL Tint'},
        {title:'My Tint Color Will Change',hasCheck:true}
       ]
       
       var tints = ['red','cyan','green',null];
       
       var tableView = Ti.UI.createTableView({
         backgroundColor:'white',
         data:data,
         top:0,
         height:'49%'
       });
       
       tableView.addEventListener('click',function(e){
       
           if (e.index < 4)
           {
               var theRow = tableView.sections[0].rows[4];
               theRow.tintColor = tints[e.index];
           }
       })
       
       win.add(tableView);
       
       var section = Ti.UI.createListSection();
       var dataSet = [
           {properties: { title: 'Red Tint'}},
           {properties: { title: 'Cyan Tint'}},
           {properties: { title: 'Green Tint'}},
           {properties: { title: 'NULL Tint'}},
           {properties: { title: 'My Tint Color Will Change',accessoryType:Ti.UI.LIST_ACCESSORY_TYPE_CHECKMARK}},
       ];
       section.setItems(dataSet);
       var listView = Ti.UI.createListView({top:'51%',sections:[section]});
       
       listView.addEventListener('itemclick',function(e){
           if (e.itemIndex < 4) 
           {
               e.section.updateItemAt(4,{properties: { title: 'My Tint Color Will Change',accessoryType:Ti.UI.LIST_ACCESSORY_TYPE_CHECKMARK,tintColor:tints[e.itemIndex]}});
           };
       })
       
       win.add(listView);
       win.open();
       
  2. Vishal Duggal 2014-03-14

    Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/5471 3_2_X - https://github.com/appcelerator/titanium_mobile/pull/5473
  3. Olga Romero 2014-03-19

    Tested and verified the fix with: Appcelerator Studio, build: 3.2.3.201403171239 Titanium SDK, build: 3.2.3.v20140317142455 Node.JS Version: v0.10.13 NPM Version: 1.3.2 ├── acs@1.0.14 ├── alloy@1.3.1 ├── npm@1.3.2 ├── titanium@3.2.1 └── titanium-code-processor@1.1.0 Device:iPad iOS 7.0.3 tintColor is supported in TableView Row and listItem

JSON Source