Problem description
When a View is child of TableViewRow, it becomes impossible to resize it dynamically. Parameters width and height are actually changed, but the view inside the app does not change.
Steps to reproduce
1. Test out this app:
// make a window to test in
var win = Ti.UI.createWindow( { backgroundColor: 'white' } );
win.open();
// WINDOW VIEW (works)
var wView = Ti.UI.createView( {
backgroundColor: 'yellow',
width: 150,
height: 150,
top: 25
} );
win.add( wView );
var wViewToggle = false;
wView.addEventListener( 'click', function () {
wViewToggle = !wViewToggle;
if ( wViewToggle ) {
wView.backgroundColor = 'blue';
wView.width = 100;
wView.height = 100;
} else {
wView.backgroundColor = 'yellow';
wView.width = 150;
wView.height = 150;
}
Ti.API.info( 'wView.width = ' + wView.width );
Ti.API.info( 'wView.height = ' + wView.height );
} );
// TABLE VIEW (broken)
var table = Ti.UI.createTableView( {
top: 200
} );
win.add( table );
var row = Ti.UI.createTableViewRow( {
backgroundColor: 'red',
selectionStyle: 'none',
height: Ti.UI.SIZE
} );
table.data = [ row ];
var tView = Ti.UI.createView( {
backgroundColor: 'yellow',
width: 200,
height: 200
} );
row.add( tView );
var tViewToggle = false;
tView.addEventListener( 'click', function () {
tViewToggle = !tViewToggle;
if ( tViewToggle ) {
tView.backgroundColor = 'blue';
tView.width = 100;
tView.height = 100;
} else {
tView.backgroundColor = 'yellow';
tView.width = 150;
tView.height = 150;
}
Ti.API.info( 'tView.width = ' + tView.width );
Ti.API.info( 'tView.height = ' + tView.height );
} );
Clicking on the squares, the result should be a resize of the view; while the square on top works (view is inside the window), the second does not (view inside tableviewrow).
Another code example that reproduces:
Forgot to mention, happens on iOS 6.1 with SDK 3.0.0.GA. Issue should be updated with the SDK and iOS.
cannot reproduce Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
Issue does not reproduces Tested with iOS SDK: 5.1 iOS iPhone Simulator: 5.1 Mac OS X Version 10.7.5 Titanium SDK version 3.1.1.v20130606121419 Titanium Studio, build: 3.0.1.201212181159
Closing ticket as "Cannot Reproduce" with reference to the above comments.