[TIMOB-10566] iOS: Add 'autorotate' property to imageview
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-18T13:28:46.000+0000 |
Affected Version/s | Release 3.0.0 |
Fix Version/s | Release 3.0.0, Sprint 2012-19 API, 2012 Sprint 19 |
Components | iOS |
Labels | ImageView, api, parity, qe-review, qe-testadded |
Reporter | Allen Yeung |
Assignee | Vishal Duggal |
Created | 2012-08-22T16:21:51.000+0000 |
Updated | 2013-01-09T19:53:31.000+0000 |
Description
Android recently added a property called 'autorotate' which will rotate the image inside an image view based on the exif data of the image. iOS does this by default, but we want to add this property to be able to disable it.
Android has this flag false by default, and iOS will have it true by default. Since there are performance implications on the Android side, we can't have the same default value.
You can use the following code with the attached image to test out this behavior:
var win = Titanium.UI.createWindow();
var image = Ti.UI.createImageView({
autorotate: true,
image: 's2.jpg'
})
win.add(image);
win.open();
Attachments
File | Date | Size |
---|---|---|
s2.jpg | 2012-08-22T16:21:51.000+0000 | 2323112 |
Expanded test case
Pull pending https://github.com/appcelerator/titanium_mobile/pull/2924
Verified feature works as expected. Testing environment: OS: Mac OS X Lion 10.7.4 Titanium Studio, build: 3.0.0.201210090117 Titanium SDK, build: 3.0.0.v20121014234610 Device: Nexus 7 (4.1.2)