[TIMOB-11300] iOS: Grouped tableview background color not behaving as expected
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-10-10T19:59:36.000+0000 |
Affected Version/s | Release 2.1.3, Release 3.0.0 |
Fix Version/s | Release 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21 |
Components | iOS |
Labels | api, qe-ios100112 |
Reporter | Eric Merriman |
Assignee | Vishal Duggal |
Created | 2012-10-08T21:33:47.000+0000 |
Updated | 2012-12-04T19:34:15.000+0000 |
Description
When using a grouped tableview with "style: Titanium.UI.iPhone.TableViewStyle.GROUPED", the background color of the tableview is not behaving as expected. When using the default settings (with no color set) it is expected that all iOS versions show the "striped" background. This is not the case with iOS 6, it seems a transparent background is used. Additionally, when setting a background color, the tableview rows also adopt this color, this occurs on all iOS versions tested (iOS 4.3.5, 5.1, 6.0).
This is a regression as it does not occur in 2.1.2GA (unable to test on device)
var win = Ti.UI.createWindow();
var data = [
{title:'Row 1', hasChild:true, color:'red', selectedColor:'#fff'},
{title:'Row 2', hasDetail:true, color:'green', selectedColor:'#fff'},
{title:'Row 3', hasCheck:true, color:'blue', selectedColor:'#fff'},
{title:'Row 4', color:'orange', selectedColor:'#fff'}
];
var tableview = Titanium.UI.createTableView({
data:data,
style: Titanium.UI.iPhone.TableViewStyle.GROUPED//,
//backgroundColor: "red"
});
win.add(tableview);
win.open();
Steps to reproduce:
part one:
1) Create a project with the sample code above
2) Run in iOS 6 simulator or on device
part two:
1) Uncomment background color and comma in code
2) Run in simulator or on device
Results:
part one:
iOS 6: Transparent background
iOS <6: Striped background
Part two:
Tableview and tableview rows show red color
Attachments
File | Date | Size |
---|---|---|
2.1.2 on iOS 6.png | 2012-10-08T21:47:05.000+0000 | 62020 |
2.1.3 on iOS 5.png | 2012-10-08T21:47:05.000+0000 | 46330 |
2.1.3 on iOS 6.png | 2012-10-08T21:47:05.000+0000 | 41506 |
background set to red.png | 2012-10-08T21:47:05.000+0000 | 43419 |
master PR https://github.com/appcelerator/titanium_mobile/pull/3150 3.0.X PR https://github.com/appcelerator/titanium_mobile/pull/3151 2.1.X PR https://github.com/appcelerator/titanium_mobile/pull/3152
Tested with 3.0.0.v20121130200208 on iPhone 4 5.1.1 and iPhone 5 6.0