Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8271] iOS: Composite Layout - startLayout() is not respected

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2012-03-26T09:24:20.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sn/a
ComponentsiOS
Labelsparity, qe-ios031912, qe-nfc
ReporterWilson Luu
AssigneeVishal Duggal
Created2012-03-24T10:51:37.000+0000
Updated2017-03-13T18:07:33.000+0000

Description

Steps to reproduce: 1. Run the following code:

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

var buttonStart = Ti.UI.createButton({
	title: 'Start',
	top: 20,
	height: Ti.UI.SIZE,
	width: Ti.UI.SIZE

});
var buttonFinish = Ti.UI.createButton({
	title: 'Finish',
	top: 140,
	height: Ti.UI.SIZE,
	width: Ti.UI.SIZE	
});
var buttonUpdate = Ti.UI.createButton({
	title: 'Update',
	top: 260,
	height: Ti.UI.SIZE,
	width: Ti.UI.SIZE
});

buttonStart.addEventListener('click', function()
{	
	view.startLayout();
	view.width = 75;
	view.height = 75;
});

buttonFinish.addEventListener('click', function()
{	
	view.finishLayout();
});


buttonUpdate.addEventListener('click', function()
{	
	view.updateLayout({
		height: 100,
		width:100
	});
});


var view = Ti.UI.createView({
	backgroundColor: 'red',
	height: 50,
	width: 50,
	top: 330
})


win.add(buttonStart);
win.add(buttonFinish);
win.add(buttonUpdate);
win.add(view);
win.open();

2. Press Start Actual: The red square becomes bigger. Expected: The red square should not get bigger until you press Finish. Note: The above code works as expected on Android.

Comments

  1. Vishal Duggal 2012-03-26

    The immediate mode of layout update is deprecated not removed. Once we remove the support for immediate mode the startLayout/finishLayout calls will be respected.
  2. Lee Morris 2017-03-13

    Closing ticket as invalid.

JSON Source