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
After a very long series of observation was able to track down the bug, pending pull request #363
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