Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13063] iOS: TableView with height Ti.UI.SIZE and style Ti.UI.iPhone.TableViewStyle.GROUPED has incorrect height

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.0.2, Release 3.1.0, Release 3.2.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterJeroen van Vianen
AssigneeUnknown
Created2013-03-10T22:13:47.000+0000
Updated2018-02-28T20:04:08.000+0000

Description

Problem description

When adding a TableView with { height: Ti.UI.SIZE, style: Ti.UI.iPhone.TableViewStyle.GROUPED }, the height of the view is calculated incorrectly and results in a "cut-off" tableview.

Steps to reproduce

Use the following code to see the bug:
var win = Ti.UI.createWindow({
	title : 'Multiple tableviews',
	layout : 'vertical',
	backgroundColor : '#ffffff'
});

var scrollview = Ti.UI.createScrollView({
	top : 0,
	width : Ti.UI.FILL,
	height : Ti.UI.FILL,
	layout : 'vertical'
});
win.add(scrollview);

var tableview1 = Ti.UI.createTableView({
	backgroundColor : '#ffffff',
	scrollable : false,
	style : Ti.UI.iPhone.TableViewStyle.GROUPED,
	data : [{
		title : 'Row 1'
	}, {
		title : 'Row 2'
	}, {
		title : 'Row 3'
	}],
	height : Ti.UI.SIZE
});
scrollview.add(tableview1);

var img = Ti.UI.createImageView({
	image : 'http://cloud.appcelerator.net/cb0dbcc6-6fe3-4206-a32e-cf266c80aa3d/default_app_logo.png',
	width : 320,
	height : 320
});
scrollview.add(img);

var tableview2 = Ti.UI.createTableView({
	backgroundColor : '#ffffff',
	scrollable : false,
	//style: Ti.UI.iPhone.TableViewStyle.GROUPED,
	data : [{
		title : 'Row 4'
	}, {
		title : 'Row 5'
	}, {
		title : 'Row 6'
	}],
	height : Ti.UI.SIZE
});
scrollview.add(tableview2);
win.open();
The window contains a scrollview with layout vertical and three subviews (a non-scrollable tableview with grouped rows (incorrect height), an image and another non-scrollable tableview (not grouped, correct height). A scrollview is used to make sure the window with all three subviews can be scrolled, and not the individual tableviews.

Attachments

FileDateSize
app.js2013-03-10T22:13:47.000+0000971
iOS Simulator Screen shot Mar 10, 2013 23.10.01.png2013-03-10T22:13:47.000+0000124939
iOS Simulator Screen shot Mar 10, 2013 23.13.08.png2013-03-10T22:13:47.000+0000126727

Comments

  1. Daniel Sefton 2013-05-30

    Tested and confirmed on iOS 6 simulator with Ti SDK 3.1 GA and 3.2 CI.

JSON Source