[TIMOB-10998] iOS: iOS 6 only - tableView - On a tableview using iOS TableViewStyle.GROUPED, you can't set the tableview background to a color or an image
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-20T14:32:19.000+0000 |
Affected Version/s | Release 2.1.3 |
Fix Version/s | Release 2.1.3, Release 3.0.0, Sprint 2012-19 API, 2012 Sprint 19 |
Components | iOS |
Labels | api, qe-ios090112, qe-ios6, qe-nfc, qe-testadded |
Reporter | Eric Merriman |
Assignee | Vishal Duggal |
Created | 2012-09-19T15:04:45.000+0000 |
Updated | 2014-06-19T12:44:40.000+0000 |
Description
Description: A blog comment was made regarding this issue and we investigated. Setting the background color of a grouped tableview to "transparent" did not work, nor did any other color. The pin-striped default was used instead.
This does not occur on iOS 5 devices even when the iOS 6.0 SDK and Xcode 4.5 are used for the build.
This is not a regression because iOS 6 was not available previously.
Here is the repro code:
var win = Ti.UI.createWindow();
var data=[];
var passwordRow = Ti.UI.createTableViewRow({
height:50,
borderColor: '#000000',
borderWidth: 2,
});
var password = Titanium.UI.createTextField({
color:'#000000',
backgroundColor:'white',
height:35,
top:10,
left:10,
width:250,
hintText:'New Password',
autocorrect: false,
passwordMask: true,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_NONE
});
passwordRow.add(password);
var passwordRow2 = Ti.UI.createTableViewRow({
height:50,
borderColor: '#000000',
borderWidth: 2,
});
var password2 = Titanium.UI.createTextField({
color:'#000000',
backgroundColor:'blue',
height:35,
top:10,
left:10,
width:250,
hintText:'New Password',
autocorrect: false,
passwordMask: true,
borderStyle:Titanium.UI.INPUT_BORDERSTYLE_NONE
});
passwordRow2.add(password2);
data.push(passwordRow);
data.push(passwordRow2);
var newpasswordbox = Ti.UI.createTableView({
backgroundColor:'transparent',
rowBackgroundColor:'#666',
data:data,
style: Titanium.UI.iPhone.TableViewStyle.GROUPED,
width: 300,
top: 20,
left: 10,
height: 130,
scrollable: false
});
win.add(newpasswordbox);
win.open();
Steps to reproduce:
1) Use the above code in a new Studio project
2) Build for device or simulator iOS 6.0
3) Observe the pin-striped tableview background
Result:
The tableview background color setting is ignored and is pin-striped instead
Expected:
The tableview background color is transparent
Attachments
File | Date | Size |
---|---|---|
ios5.jpg | 2012-09-19T15:04:45.000+0000 | 50695 |
ios6.jpg | 2012-09-19T15:04:45.000+0000 | 48842 |
Additional note: This is easily reproducible in the simulator.
Pull pending https://github.com/appcelerator/titanium_mobile/pull/3002
Also note PR: https://github.com/appcelerator/titanium_mobile/pull/3000
2_1_X PR MERGED IN https://github.com/appcelerator/titanium_mobile/pull/3011
Tested and verified on: OS: Mac OS X Lion 10.7.4 Titanium Studio, build: 2.1.2.201208301612 Titanium SDK, build: 2.1.3.v20120921141611 Device: iPhone 4S (6.0.GM) The tableview background color is transparent.
Verified the fix on: MAC OSX 10.8.1 Titanium studio : 2.1.2.201208301612 SDK version : 3.0.0.v20120921144915 xcode 4.5 built with iOS6 SDK on Ipad 3 running iOS6 & on Iphone simulator.
Sorry, I can't verify this fix. It persists on iOS6 simulator and iPhone 5: MAC OSX 10.8.2 Titanium Studio: 2.1.2.201208301612 SDK version: 2.1.3.20120928124610 XCode 4.5 Built with iOS6 on simulator and iPhone 5
Apologies, thought I'd fully cleaned but was still building with the 15th Sept build... Can verify this fix on 2.1.3.20120928124610 with the information above. Thanks guys.
Please consider the input here: http://developer.appcelerator.com/question/142390/ios-sdk-6-and-grouped-tableview-transparancybackground-color-failure#comment-142269 The default striped background is still not working on the ipad.