Project: titanium
Issue TIMOB-20146: iOS: Autolayout lays out wrongly when view is added to window
h4. Steps to reproduce 1. Create a new titanium classic app 2. add true to tiapp.xml 3. Change app.js to this: {code} var mainWindow =Ti.UI.createWindow({ top:20, backgroundColor:'white', layout:'horizontal' }); var mainView = Ti.UI.createView({ backgroundColor:'white', layout:'horizontal', }); var label1 = Ti.UI.createLabel({ text : 'label1 ', }); var label2 = Ti.UI.createLabel({ text : 'label2 ', }); var label3 = Ti.UI.createLabel({ text : 'label3 ', }); var label4 = Ti.UI.createLabel({ text : 'label4 ', }); var label5 = Ti.UI.createLabel({ text : 'label5 and more ', height: 40 }); var label6 = Ti.UI.createLabel({ text : 'label6 ', horizontalWrap: true }); var label7 = Ti.UI.createLabel({ text : 'label7 ', }); var label8 = Ti.UI.createLabel({ text : 'label8 ', }); // Add to the parent view. mainView.add(label1); mainView.add(label2); mainView.add(label3); mainView.add(label4); mainView.add(label5); mainView.add(label6); mainView.add(label7); mainView.add(label8); mainWindow.add(mainView); mainWindow.open(); {code} h4. Expected result you should see the labels 20pixels away from to top edge. h4. Actual result you will see the labels right at the top edge.
Story points: 5