[TIMOB-8422] iOS: Specifying a size in points is not supported
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-03-29T13:30:08.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | core |
Reporter | Arthur Evans |
Assignee | Neeraj Gupta |
Created | 2012-03-29T13:20:28.000+0000 |
Updated | 2017-03-09T23:25:42.000+0000 |
Description
When adding a view with a size specified in points (pt), the size specifier is ignored.
Given the following code, the two labels l1 and l2 should be the same size and aligned vertically, as shown in the Android screenshot. Instead, the views are not aligned correctly and the sizes are wrong.
var win1 = Titanium.UI.createWindow({
title:'Composite Layout Test',
backgroundColor:'#fff',
layout: 'vertical'
});
var l1 = Titanium.UI.createLabel({
top: 0,
color:'#999',
backgroundColor: 'blue',
text:'1in',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'1in',
height:'1in'
});
win1.add(l1);
var l2 = Titanium.UI.createLabel({
top: 0,
color:'#999',
backgroundColor: 'red',
text:'72pt',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:'72pt',
height:'72pt'
});
win1.add(l2);
var l3 = Titanium.UI.createLabel({
top: 0,
color:'#999',
backgroundColor: 'green',
text:'72 units',
font:{fontSize:20,fontFamily:'Helvetica Neue'},
textAlign:'center',
width:72,
height:72
});
win1.add(l3);
win1.open();
Rechecked spec. I thought "pt" was included, but it is not. It's only supported on Android.
Closing ticket as invalid.