Description:
Adding a label to a tableview row gives a console warning about the layout of the label and the row _if_ the label has a margin.
Sample code:
var win = Ti.UI.createWindow({
backgroundColor:'#ccc'
});
var table = Ti.UI.createTableView({
rowHeight:44
});
var row = Ti.UI.createTableViewRow();
var label = Ti.UI.createLabel({
text:'Hello World',
width:Ti.UI.SIZE,
height:Ti.UI.SIZE,
backgroundColor:'white',
left:20 // removing the left property will make the warnings go away
})
row.add(label);
table.setData([row]);
win.add(table);
win.open();
Console warnings:
[WARN] [object TiUILabel] has an auto height value of 0, meaning this view may not be visible.
[WARN] [object TiUITableViewRow] has an auto height value of 0, meaning this view may not be visible.
A workaround for this is to disable this output directly modifying the titanium SDK. For anyone interested, edit file TiUIViewProxy.m in Titanium mobile sdk folder. Inside the file, you can look for the phrase "has an auto" . In Titanium 2.0.2 there are 2 coincidences in lines 689 and 782 (one for height and one for width). Comment these lines to hide the annoying message.
Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
Closing ticket as the issue cannot be reproduced.