problem
If there are TableViewRows after a TableViewSection that contains a footerView, that section's footView will appear after the following rows, not at the end of the section. Please see the attached screenshot for a clearer picture.
test case
var rowCtr = 0,
data = [];
var win = Ti.UI.createWindow({
backgroundColor: '#fff',
fullscreen: false,
exitOnClose: true
});
var section = Ti.UI.createTableViewSection({
headerView: Ti.UI.createLabel({
text: 'headerView',
backgroundColor: '#a00',
color: '#fff',
height: '40dp',
width: Ti.UI.FILL
}),
footerView: Ti.UI.createLabel({
text: 'footerView',
backgroundColor: '#00a',
color: '#fff',
height: '40dp',
width: Ti.UI.FILL
})
});
genRows(4, data);
genRows(4, section);
data.push(section);
genRows(4, data);
var table = Ti.UI.createTableView({
data: data
});
win.add(table);
win.open();
function genRows(num, obj) {
var isSection = typeof obj.length === 'undefined';
for (var i = 0; i < num; i++) {
var row = Ti.UI.createTableViewRow({
title: (isSection ? 'section ' : '') + 'row ' + (++rowCtr)
});
if (!isSection) {
obj.push(row);
} else {
obj.add(row);
}
}
}
The footerView in the attached image should be after "section row 8", not at the end of the table, as the footerView belongs to the section, not the table.
Issue reproduce 3.2.0 and 3.4.0 Appcelerator Studio, build: 3.3.0.201407111535 TiSDK 3.4.0 iOS SDK: 7.1 Titanium Command-Line Interface, CLI version 3.3.0
I am able to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170620103414 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131