Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: Release 9.0.3, Release 9.2.0
-
Fix Version/s: Release 9.2.1
-
Component/s: iOS
-
Sprint:2020 Sprint 20
Description
When updating a backgroundImage of a View after a timeout (or click event), while the new image is loading a different image (unreferenced, but bundled with the app) will display before the new image is displayed. This problem does not occur with ImageView:image.
The problem shows with SDK 9.2.0 and 9.0.3.GA on iOS 14. The problem does not show with SDK 9.2.0 on iOS 13 or iOS 12.
Expected result
Irrelevant image should not display, only the backgroundImage that was set on creation and the one that is set after a timeout/click event.
Code
Sample app.js:
|
var win = Ti.UI.createWindow({ |
backgroundColor:'black' |
});
|
|
var test1 = Ti.UI.createImageView({ |
width : 100,
|
height : 100,
|
left : 10,
|
top : 30,
|
backgroundImage : "/images/arm1.png" |
});
|
|
win.add(test1);
|
win.open();
|
|
win.addEventListener('click', e => { |
test1.backgroundImage = "/images/arm0.png"; |
});
|
|
Attached are images from the assets directory. Do extract all of the images to reproduce the problem. (put them either in /Resources/images or /Resources/iphone/images.