[AC-388] convertUnits iphone 6 plus calculates wrong pixel size from dips
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Needs more info |
Resolution Date | 2015-11-21T19:12:55.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | ios, iphone |
Reporter | Michel van Gooswilligen |
Assignee | Radamantis Torres-Lechuga |
Created | 2014-11-27T09:44:20.000+0000 |
Updated | 2015-11-21T19:12:55.000+0000 |
Description
looking at the code from UIModule (ios) for the convertToUnits method:
if ([TiUtils isRetinaDisplay]) {
result = fromVal.value*2;
}
else {
result = fromVal.value;
}
Which does not take into account the new "hdd retina"
This is in Ti SDK [core code](https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/UIModule.m). According to the documentation [link](http://docs.appcelerator.com/platform/latest/#!/guide/Layouts,_Positioning,_and_the_View_Hierarchy) iPhone with either original or retina display is based on a 320 x 480 dip grid. Where 1dip=2px on retina. But what about for HD retina display like iPhone6 or iPhone6Plus. So issue is in core code. Where it's only counted the retina display and calculate the conversion to pixels according to documentation ( as two times ). But for iPhone6 and iPhone6 Plus display it's not true. You can get the dpi value for any device by
iPhone 6 plus device is not available here, So we can't test the issue. Thanks.