[TIMOB-11030] iOS: Applying background color constants or "stripped" color to modal window results in the modal window being black
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-09-22T07:29:45.000+0000 |
Affected Version/s | Release 2.1.3 |
Fix Version/s | Sprint 2012-19 API, 2012 Sprint 19 |
Components | iOS |
Labels | api, qe-ios090112, qe-ios6 |
Reporter | Tamila Smolich |
Assignee | Vishal Duggal |
Created | 2012-09-20T15:55:40.000+0000 |
Updated | 2013-03-13T18:54:43.000+0000 |
Description
Description:
Applying background color constants or "stripped" color to modal window results in the modal window being black.
This doesn't occur on iOS 5 devices even if 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.
Steps:
1. Run the following code on iOS 6.0:
var win = Ti.UI.createWindow({
backgroundColor: '#ccc'
});
var btn = Ti.UI.createButton({
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
title: 'Click me!'
});
win.add(btn);
btn.addEventListener('click', function(e) {
var w = Ti.UI.createWindow({
backgroundColor : 'stripped'
});
var scrollView = Ti.UI.createScrollView({
contentHeight: 1000,
width: Ti.UI.FILL,
height: Ti.UI.FILL
});
var label = Ti.UI.createLabel({
text : 'Scroll Down',
height : Ti.UI.SIZE,
width : Ti.UI.FILL,
textAlign : 'center',
top: 10
});
var textArea = Ti.UI.createTextArea({
left:10,
right:10,
bottom: 150,
height: 100,
});
var Close = Titanium.UI.createButton({
title : 'Close',
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
bottom: 50
});
scrollView.add(label);
scrollView.add(textArea);
scrollView.add(Close);
Close.addEventListener('click',function(){
w.close();
})
textArea.addEventListener('return', function() {
textArea.blur();
});
w.add(scrollView);
w.orientationModes = [
Titanium.UI.PORTRAIT,
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
];
w.open({modal : true});
});
win.open();
2. Press "Click me" button
Expected result:
Should see a modal window with "Scroll Down" label
Actual result:
The modal window turns black
The [UIColor groupTableViewBackgroundColor] constant has been deprecated in IOS6. Using this value on devices running IOS6 and above will result in black backgrounds. Setting up PR to warn developers regarding this change and updating docs for the same.
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)
Text of warning: This constant has been deprecated in iOS 6. Group style table views still default to using the standard iOS group table view background texture if no background color is specified. However, specifying this constant explicitly on iOS 6 and above results in a black background color.
Reopening to change resolution state.
Closing as invalid. For ios 6.0 there is a console warning: [WARN]Group style table view backgrounds can no longer be represented by a simple color. Reverting to black