Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4520] iOS: Empty TableView in TabGroup Doesn't Have Separators

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2011-10-27T15:47:02.000+0000
Affected Version/sRelease 1.7.0, Release 1.7.1
Fix Version/sSprint 2011-32, Release 1.8.0
ComponentsiOS
Labelsregression
ReporterDawson Toth
AssigneeSabil Rahim
Created2011-06-29T07:04:11.000+0000
Updated2014-06-19T12:46:27.000+0000

Description

Problem

Empty TableViews normally have separators every 40ish pixels or so for the empty rows; but as of 1.7.0, they don't show up if the TableView is in a TabGroup.

Expected Behavior

There should be separators every 40ish pixels, even in an empty TableView in a TabGroup.

Example Code

Drop the following in an app.js and you will see a large white box. This is the table view. Touch "2. Click Me" and a row will be added. Notice that the row has a separator, but that there aren't any other separators beneath it.
var win = Ti.UI.createWindow({
    title: '1. Look @ White Table',
    backgroundColor: '#000'
});

var table = Ti.UI.createTableView({
    top: 0, height: 200,
    separatorColor: 'green'
});
win.add(table);

var addRow = Ti.UI.createButton({
    bottom: 0, height: 50,
    title: '2. Click Me'
});
addRow.addEventListener('click', function() {
    table.appendRow({ title: '3. Look @ My Separator' });
});
win.add(addRow);

var tabGroup = Ti.UI.createTabGroup();
tabGroup.addTab(Ti.UI.createTab({
    window: win
}));
tabGroup.open();
Compare that to the following code. Drop this in an app.js, and you will see the proper behavior -- there are separators every 40ish pixels as expected.
var win = Ti.UI.createWindow({
    title: '1. Look @ Separators',
    backgroundColor: '#000'
});
var table = Ti.UI.createTableView({
    top: 0, height: 200,
    separatorColor: 'green'
});
win.add(table);
win.open();

Screenshots

Attached.

Associated Helpdesk Ticket

http://appc.me/c/APP-372136

Attachments

FileDateSize
test 1.6.2.png2011-06-29T07:04:11.000+000034279
test 1.7.1.png2011-06-29T07:04:11.000+000027428

Comments

  1. Sabil Rahim 2011-08-11

    After a very long series of observation was able to track down the bug, pending pull request #363
  2. Vikramjeet Singh 2011-08-29

    Tested On: Mac OSX Lion TiMob: 1.8.0v20110819142548 TiStud: 1.0.4.201108101535 Devices: iPhone4 version 4.2.10 iPad2 version 4.3.5 iPod 3

JSON Source