[TIMOB-7317] IOS: ImageView fires the load event with state 'url' instead of 'image'
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-09-13T02:24:40.000+0000 |
| Affected Version/s | Release 1.8.0.1, Release 2.0.0 |
| Fix Version/s | Sprint 2012-13 API |
| Components | iOS |
| Labels | api, apidoc-escalate, module_imageview, parity, qe-review, qe-testadded, training |
| Reporter | Vishal Duggal |
| Assignee | Vishal Duggal |
| Created | 2012-01-20T14:01:02.000+0000 |
| Updated | 2013-12-10T06:15:01.000+0000 |
Description
Android has "image" and "images" for load states.
IOS has "url" and "images".
Since "url" property has been deprecated and replaced by "image", load event should fire with state "image"
https://github.com/appcelerator/titanium_mobile/pull/2418
Test case:
var win = Titanium.UI.createWindow({ backgroundColor:'#fff' }); var imgView = Ti.UI.createImageView( { touchEnabled: false, //if this is false: load event does not fire. If true it does! left:0, top:0, width: 100, height: 100 }); Ti.API.info("Adding load event listener"); imgView.addEventListener('load', function(e){ Ti.API.info("image loadded state is "+e.state); }); imgView.image = 'http://docs.appcelerator.com/titanium/2.0/landing/appc_welcome.png'; win.add(imgView); win.open();Verified fixed with : Mobile sdk-2.2.0.v20120810080115 Titanium Studio, build: 2.1.1.201207271312 Device: Ipad 5.1
Reopening to update labels
Anvil testcase PR https://github.com/appcelerator/titanium_mobile/pull/4993