Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2780] iOS: ImageView not firing 'load' event

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-06-22T22:49:33.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsiOS
Labelsapi
ReporterTyler Johnson
AssigneeIngo Muschenetz
Created2011-04-15T03:29:21.000+0000
Updated2017-06-22T22:49:33.000+0000

Description

Ever since I upgrade to v1.5 the ImageView is not firing the load event. Not sure if this is a bug or permanent thing. If permanent, then it should be removed from docs.

Attachments

FileDateSize
app.js2011-04-15T03:29:22.000+0000582

Comments

  1. Tyler Johnson 2011-04-15

    Other people are having this problem: http://developer.appcelerator.com/question/90961/webview-load-eventlistener-broken"> http://developer.appcelerator.com/question/90961/webview-load-event...

  2. Stephen Tramer 2011-04-15

    Going to assume this is iOS, but we can test and reassign to Android if necessary.

  3. Daniel Tome 2011-04-15

    I've logged a question here with some code proving this:

    http://developer.appcelerator.com/question/117356/imageview-load-event-not-firing-on-iphone"> http://developer.appcelerator.com/question/117356/imageview-load-ev...

    Tested in: Titanium 1.6.1

    For android the load event doesn't fire at all. (Tested in APIs 2.2)
    For iPhone the event doesn't fire if touchEnabled is set to false.

    Attached app.js

  4. Stephen Tramer 2012-07-26

    Confirmed SDK 2.2.0.014b86f Test code:
       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 !! Width: " + e.source.width);
       	Ti.API.info("image loadded !! Height: " + e.source.height);
       });
       
       imgView.image = 'http://www.doublefine.com/images/uploads/remo_sad.JPG';
       
       win.add(imgView);
       win.open();
       
  5. Lee Morris 2017-06-22

    I am unable to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170620103414 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source