[TIMOB-10856] iOS: Implicit height calculation in vertical layouts are incorrect
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-14T15:38:17.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 2.1.3, Release 3.0.0, Sprint 2012-19 API, 2012 Sprint 19 |
Components | iOS |
Labels | core, layout, qe-testadded |
Reporter | Allen Yeung |
Assignee | Vishal Duggal |
Created | 2012-09-11T16:30:57.000+0000 |
Updated | 2013-09-19T10:39:17.000+0000 |
Description
var win = Ti.UI.createWindow({
backgroundColor:'white',
layout:'vertical'
})
var view1 = Ti.UI.createView({
top: 100,
left:5,
right: 5,
bottom: 100,
backgroundColor:'red'
});
win.add(view1);
win.open();
view1.addEventListener('click', function(){
Ti.API.info('----------------' + view1.size.height)
})
Expected Behavior:
The height of the red view should be the height of the screen minus the top and bottom values.
Actual:
The height of the red view is 460
Pull pending https://github.com/appcelerator/titanium_mobile/pull/2928
Backport PR https://github.com/appcelerator/titanium_mobile/pull/3001
Verified the fix on: MAC OSX 10.8.1 Titanium studio : 2.1.2.201208301612 SDK version : 3.0.0.v20120921144915 xcode 4.5 built with iOS6 SDK on Ipad 3 running iOS6 & on Iphone simulator.
Tested and verified on: OS: Mac OS X Lion 10.7.4 Titanium Studio, build: 2.1.2.201208301612 Titanium SDK, build: 2.1.3.v20120921141611 Device: iPhone 4S (6.0.GM) The height of the red view is equal to the height of the screen minus the top and bottom values.