appcelerator tableview seprators没有显示

时间:2016-01-21 22:23:32

标签: tableview appcelerator appcelerator-titanium

tableview中的分隔符未显示 例如

Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow();

var tableData = [ {title: 'Apples'}, {title: 'Bananas'}, {title: 'Carrots'}, {title: 'Potatoes'} ];

var table = Ti.UI.createTableView({
data: tableData
});
win.add(table);
win.open();

我也试过

table.separatorStyle = Ti.UI.iPhone.TableViewSeparatorStyle.SINGLE_LINE; 
table.separatorColor = "#000";

还试过运行kitchsink,分隔符根本没有显示

任何想法?

1 个答案:

答案 0 :(得分:1)

我建议使用ListViews而不是TableViews:https://docs.appcelerator.com/platform/latest/#!/guide/ListViews

它们在大型列表上提供了巨大的性能提升。您还可以在使用ListItems模板时更好地处理设计。