Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[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 Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-09-20T14:32:19.000+0000
Affected Version/sRelease 2.1.3
Fix Version/sRelease 2.1.3, Release 3.0.0, Sprint 2012-19 API, 2012 Sprint 19
ComponentsiOS
Labelsapi, qe-ios090112, qe-ios6, qe-nfc, qe-testadded
ReporterEric Merriman
AssigneeVishal Duggal
Created2012-09-19T15:04:45.000+0000
Updated2014-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

FileDateSize
ios5.jpg2012-09-19T15:04:45.000+000050695
ios6.jpg2012-09-19T15:04:45.000+000048842

Comments

  1. Eric Merriman 2012-09-19

    Additional note: This is easily reproducible in the simulator.
  2. Vishal Duggal 2012-09-19

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/3002
  3. Ingo Muschenetz 2012-09-19

    Also note PR: https://github.com/appcelerator/titanium_mobile/pull/3000
  4. Sabil Rahim 2012-09-20

    2_1_X PR MERGED IN https://github.com/appcelerator/titanium_mobile/pull/3011
  5. 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) The tableview background color is transparent.
  6. Lokesh Choudhary 2012-09-21

    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.
  7. James Wise 2012-09-28

    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
  8. James Wise 2012-09-28

    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.
  9. Martin van Mierloo 2012-09-29

    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.

JSON Source