Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18558] ImageView load event fired on Android but not on iOS

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterChris Bowley
AssigneeUnknown
Created2015-02-12T12:07:26.000+0000
Updated2018-02-28T19:55:02.000+0000

Description

I have two ImageViews. I want to load images from URLs and fade between them. Here is a simplified version of my code:
<Alloy>
    <ImageView id="imageview1" />
    <ImageView id="imageview2" />
</Alloy>
var animation = require('alloy/animation');

var image1URL = "...";
var image2URL = "...";
var image3URL = "...";
var image4URL = "...";

$.imageview1.addEventListener('load', function(e){
    Ti.API.debug('imageview1 load');
    animation.crossFade(imageview2, imageview1, 1000);
});

$.imageview2.addEventListener('load', function(e){
    Ti.API.debug('imageview2 load');
    animation.crossFade(imageview1, imageview2, 1000);
});

// load first image... load event is fired
$.imageview1.image = image1URL;

// load event never fired for any subsequent image load...
setTimeout(function() {
    $.imageview2.image = image2URL;
}, 5000);

setTimeout(function() {
    $.imageview1.image = image3URL;
}, 10000);

setTimeout(function() {
    $.imageview2.image = image4URL;
}, 15000);
On Android the ImageView load events fire as expect: every time the image property changes and the new images loads. However on iOS: * The load event is fired when imageview1 image property is first set and the image loads * The load event is not fired when imageview2 image property is first set and the image loads * The load event is not fired for either imageview1 or imageview2 when the image property is changed

Comments

No comments

JSON Source