Project: titanium
Issue TIMOB-17923: iOS: Complex non-composite layouts show before lay-out since 3.3.0
A few weeks ago I started noticing that a lot of apps where I used complex {{horizontal}} and {{vertical}} layouts were showing their children before they were layed out. I made a simple test case that showed this has been the case since 3.3.0 and is not related to iOS 8 which I first assumed. *NOTE:* In some occasions I've (as well as Jason) have seen the children not being layed out at all! h2. Test case Run the following test case again Titanium 3.3.0.GA or later: {code:javascript} var win = Ti.UI.createWindow({ backgroundColor: 'white' }); win.add(Ti.UI.createLabel({ text: 'Click' })); win.addEventListener('click', function(e) { var win = Ti.UI.createWindow({ backgroundColor: 'red', layout: 'vertical', }); win.addEventListener('click', function(e) { win.close(); }); for (var i = 0; i < 500; i++) { win.add(Ti.UI.createLabel({ top: (i === 0) ? 20 : 0, color: 'white', text: 'Line #' + (i + 1) })); } win.open(); }); win.open(); {code} h2. Attached videos The movies I recorded show clearly that the children show center-top (except the first label which has {{top:20}} before being layed out at their proper place. Before Titanium 3.3.x the children views didn't show up until they were layed out, which of course looks better. - {{323-710.mov}} Titanium 3.2.3 & iOS 7.1 (vertical) (/) - {{330-710.mov}} Titanium 3.3.0 & iOS 7.1 (vertical) (x) - {{330-710-horizontal.mov}} Titanium 3.3.0 & iOS 7.1 (horizontal) (x) - {{340-810.mov}} Titanium 3.4.0 & iOS 8.1 (vertical) (x)
Story points: 21