WARN: [TIUIView autoWidthForWidth] should have been overridden
I'm trying to get a TableView to display long text and having trouble doing so. While fiddling with the parameters of the table view, I got the following error:
>[WARN] > contained >, but called AutoWidthForView was called for it anyways.This typically means that -[TIUIView autoWidthForWidth] should have been overridden.
The greater-than symbols around the "contained" are literal. This is an accurate cut-paste.
The code that caused this appears to have been
var tableView = Ti.UI.createTableView({
data: [],
separatorStyle: Titanium.UI.iPhone.TableViewSeparatorStyle.NONE,
height: 'auto',
width: 'auto',
layout: 'vertical'
});
Any thoughts?
1 Answer
-
Accepted Answer
Hi,
Try removing the 'auto' width and height in the createTableView call, then use height:'auto' in your createTableViewRow call.
Then use height:'auto', layout:'vertical' in the properties of the labels etc that you add to each row.
See the demo in Kitchen Sink : Base UI > Views > Table Views > Auto-height
JS: Resources/examples/table_view_api_auto_height.js
hope this helps.
Kosso