[TIMOB-8433] iOS: Ti.UI.ImageView does not follow explicit sizing
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-04-17T10:14:52.000+0000 |
Affected Version/s | Release 1.8.0 |
Fix Version/s | Release 3.0.2 |
Components | iOS |
Labels | n/a |
Reporter | Stephen Tramer |
Assignee | Shameer Jan |
Created | 2012-03-29T17:12:45.000+0000 |
Updated | 2017-03-17T18:35:03.000+0000 |
Description
Currently, iOS image views do not obey explicit sizing instructions for percentage measurements (and possibly others). For example, when we have an image of 300 x 419 at "50%" embedded in a parent view of 200, we do not see the behavior of the image view which would be expected (it measures 100 x 100, with image stretching).
var win = Ti.UI.createWindow();
var parent = Ti.UI.createView({
width:200,
height:200,
backgroundColor:'red'
});
var child = Ti.UI.createView({
width:"50%",
height:"50%",
backgroundColor:'blue'
});
var image = Ti.UI.createImageView({
width:"50%",
height:"50%",
image:'images/corkboard.jpg'
});
parent.add(child);
parent.add(image);
win.add(parent);
win.open();
issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 6.0
Closing ticket as the issue cannot be reproduced.