问题
I don't know why the TableView hides the end of a long string automatically for me. Is there a way that I can avoid that? Here are screenshot and code:

var data = [];
var row = Ti.UI.createTableViewRow();
var label = Ti.UI.createLabel({ text: 'ALongLongLongLongLongLongLongLongLongStringFromDatabaseOrSomewhere~', });
row.add(label);
data[0] = row;
var table = Titanium.UI.createTableView({
data: data,
style: Titanium.UI.iPhone.TableViewStyle.GROUPED,
});
Ti.UI.currentWindow.add(table);
Thanks a lot.
回答1:
var toImg = row.toImage(),
rowHeight = toImg.height;
row.height = rowHeight;
toImg = null;
回答2:
try
var row = Ti.UI.createTableViewRow({
height: 'auto'
});
or
var row = Ti.UI.createTableViewRow({
height: Ti.UI.SIZE
});
if you are version 2.0 or greater.
来源:https://stackoverflow.com/questions/10664992/tableviewrow-height-in-titanium