[TIMOB-8935] iOS: TableViewRow not changing background image/color
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2012-06-04T21:26:00.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | n/a |
Components | iOS |
Labels | api |
Reporter | Pablo Albrecht |
Assignee | Shak Hossain |
Created | 2012-04-10T05:49:40.000+0000 |
Updated | 2017-03-16T20:46:24.000+0000 |
Description
If you create a table with the attribute selectionStyle:Ti.UI.iPhone.TableViewCellSelectionStyle.NONE, I found an issue that we've been able to fix in such an ugly way that I decided to post the issue here.
var table = Ti.UI.createTableView({ separatorStyle:Ti.UI.iPhone.TableViewSeparatorStyle.NONE,selectionStyle:Titanium.UI.iPhone.TableViewCellSelectionStyle.NONE, backgroundImage:...,backgroundColor:'transparent'});
r = array();
r.push( Ti.UI.createTableViewRow(backgroundImage:'...',...) );
table.setData(r);
randomButton.addEventListener('click',function(e){
e.row.backgroundImage = 'otherRandomImage.png';
// This DOESN'T work so here's the fix we found:
// e.row.hide();
// e.row.show();
});
If you change the selectionStyle for the default one, it works better but it's still weird the way it changes the picture.
Hope this helps :)
The code provided can not run. The bug description is less than helpful. Assigning to Shak since this originated from his team
Dude... seriously ? 2.0.2GA and it still doesn't work, I could reproduce it in 3:20 mins (assuming the IDE is already open). Now it's even worst because we can't just refresh the row rendering by doing e.row.hide() and e.row.show() so it just doesn't work...
Seriously, indeed... Entirely reproducible under 3.0.2GA. Just spent 2h going crazy trying to fix this one. Workaround shown by Pablo works a treat. Titanium Command-Line Interface, CLI version 3.0.24, Titanium SDK version 3.0.2.GA Operating System Name = Mac OS X Version = 10.8.4 node.js node.js Version = v0.8.22 npm Version = 1.2.14 Xcode 4.6.3 (build 4H1503) iOS SDKs = 6.1 iOS Simulators = 6.1
Still not fixed in 3.1.1.GA. Is anybody actually following this thread or does it need a new ticket?
Closing ticket as the information that was requested was never provided.