Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11286] iOS: TableView property Titanium.UI.iPhone.TableViewStyle.GROUPED has a different background. (Regression Issue)

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-10-29T17:10:51.000+0000
Affected Version/sRelease 2.1.3
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 21 API, 2012 Sprint 21
ComponentsiOS
Labelsregression, triage
ReporterAmuktha Akkinepally
AssigneeVishal Duggal
Created2012-10-06T00:22:35.000+0000
Updated2012-12-13T18:33:01.000+0000

Description

The table view default background is not seen when using Ti SD 2.1.3.

Steps to Reproduce:

1. Load the below app.js 2. Test it with 2.1.2 or any earlier SDK 3. Now test it with 2.1.3 SDK Expected: the background should be same. Actual Behavior: The background goes black(blank)
var win = Ti.UI.createWindow();
	// create table view data object
	var data = [];
	var ts1 = new Date().getTime();
	
	for (var c=0;c<10;c++)
	{
		data[c] = Ti.UI.createTableViewSection({headerTitle:'Group '+(c+1)});
		for (var x=0;x<40;x++)
		{
			var label = Ti.UI.createLabel({
				text:'Group '+(c+1)+', Row '+(x+1)+"\nThis is another line.\nCool",
				height:'auto',
				width:'auto',
				left:10
			});
			var rightButton = Titanium.UI.createButton({
				style:Titanium.UI.iPhone.SystemButton.INFO_DARK,
				right:10,
				row:x,
				section:c
			});

			var row = Ti.UI.createTableViewRow({height:'auto',className:'row'});
			row.add(label);
			row.add(rightButton);
			data[c].add(row);

		}
	
	}
	var ts2 = new Date().getTime();
	
	// create table view
	var tableview = Titanium.UI.createTableView({
		data:data,
		style: Titanium.UI.iPhone.TableViewStyle.GROUPED,
		minRowHeight:80
		
	});
	

	win.add(tableview);

	win.open();

Attachments

FileDateSize
Background with 2.1.2.png2012-10-06T00:28:01.000+000041111
Background with 2.1.3.png2012-10-06T00:28:01.000+000037892

Comments

  1. Ingo Muschenetz 2012-10-06

    I believe this is a duplicate of the linked issue. Can you confirm?
  2. Vishal Duggal 2012-10-10

    Similar issues.
  3. Biren Saini 2012-10-22

    Hi, It seems that either the issue is not completely resolved or some of us are not following all the steps to resolve it. Here is a question I asked in QnA site and Shannon Hicks suggested that I add the comment here so the issue can be reopened if required. http://developer.appcelerator.com/question/143781/unable-to-create-grouped-tableview-with-striped-background-ios6#comment-144712 Let me know if more information is required.
  4. Vishal Duggal 2012-10-22

    @Biren There was a problem with the fix put in for iOS6 for Titanium.UI.iPhone.TableViewStyle.GROUPED. This was reported as TIMOB-11300. Basically if you want the default table view background for style grouped, do not set the backgroundColor property. Things should work as expected then. The fix is available in the CI builds of the 2_1_X, 3_0_X and master branches. If you do not want to use the CI build please see the following PRs for the changes required to the code. 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
  5. Biren Saini 2012-10-23

    Vishal - Thanks for your reply. I am using Titanium 2.1.3 with xcode 4.5.1 and ios6 and still facing the issue. Here is what I see when I run diagnostics test through the Ti Studio -> Help. Titanium Mobile SDK Version: 2.1.3 Mobile SDK Modules API Version:2 Mobile SDK Timestamp: 10/02/12 16:16 Mobile SDK Build Number: 15997d0 Titanium Mobile SDK Location: ~/Library/Application Support/Titanium/mobilesdk/osx/2.1.3.GA With that said, like yourself, I am also suspecting that it could be that 'somehow' the latest code is not in play here. Can I check something in my environment like in TiUITableViewProxy.m class that gets copied to the project area or somewhere else to prove that. Thanks for all you guys do. Biren.
  6. Vishal Duggal 2012-10-24

    @Biren You could just update to the latest CI build for the 2_1_X branch. (Version 2.1.4) It has 3 additional fixes after the 2.1.3 build TIMOB-11250, TIMOB-10330 and TIMOB-11285 If you pull the build from Oct 10th it has the fixes for TIMOB-11250 and TIMOB-10330. The CI builds are available here http://builds.appcelerator.com.s3.amazonaws.com/index.html (Make sure the branch is 2_1_X) To see what commits went into 2_1_X branch see https://github.com/appcelerator/titanium_mobile/commits/2_1_X
  7. Biren Saini 2012-10-24

    Thanks Vishal for your help. I tried using 2.1.4.v20121018153121 but still no luck. (I get the white background) I am concluding that there is something wrong with my environment but I am not sure what. I cleaned the build area before testing with the new SDK and also deleted the 2.1.3 directory under ~/Library/Application Support/Titamium/mobilesdk/. I will post here / QnA if and when I find out. For now, I am going ahead and using backgroundImage to force the stripe background manually. I know its a dirty solution. (but its quick also)
  8. Vishal Duggal 2012-10-24

    @Biren Could you post some test code so we can figure out whats going on
  9. Biren Saini 2012-10-26

    Vishal - This code produces the black background with 2.1.3 ---- var win = Ti.UI.createWindow(); // create table view data object var data = []; var row = Ti.UI.createTableViewRow({height:'auto', title:'Row 1'}); data[0]=row; // create table view var tableview = Titanium.UI.createTableView({ data:data, style: Titanium.UI.iPhone.TableViewStyle.GROUPED, minRowHeight:80, }); win.add(tableview); win.open(); ----
  10. Vishal Duggal 2012-10-29

    @Biren. This was the bug that was reported in TIMOB-11300. It has been fixed in all the active branches that support iOS6 (2_1_X, 3_0_X, master). I have verified that this indeed works with 2.1.4.v20121010130125 and 2.1.4.v20121018153121
  11. Natalie Huynh 2012-12-04

    Tested with 3.0.0.v20121130200208 on iPad 4 6.0.1

JSON Source