Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11030] iOS: Applying background color constants or "stripped" color to modal window results in the modal window being black

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-09-22T07:29:45.000+0000
Affected Version/sRelease 2.1.3
Fix Version/sSprint 2012-19 API, 2012 Sprint 19
ComponentsiOS
Labelsapi, qe-ios090112, qe-ios6
ReporterTamila Smolich
AssigneeVishal Duggal
Created2012-09-20T15:55:40.000+0000
Updated2013-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

Comments

  1. Vishal Duggal 2012-09-20

    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.
  2. Tamila Smolich 2012-09-21

    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)
  3. Ingo Muschenetz 2012-09-22

    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.
  4. Ingo Muschenetz 2012-09-22

    Reopening to change resolution state.
  5. Olga Romero 2012-09-24

    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

JSON Source