[TIMOB-8271] iOS: Composite Layout - startLayout() is not respected
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-03-26T09:24:20.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | parity, qe-ios031912, qe-nfc |
Reporter | Wilson Luu |
Assignee | Vishal Duggal |
Created | 2012-03-24T10:51:37.000+0000 |
Updated | 2017-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.
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.
Closing ticket as invalid.