[TIMOB-6228] iOS: animate callback never gets executed when when using Ti.UI.createAnimation
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-03-01T23:21:00.000+0000 |
Affected Version/s | Release 1.8.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | core |
Reporter | Jon Alter |
Assignee | Ingo Muschenetz |
Created | 2011-11-17T18:23:43.000+0000 |
Updated | 2017-03-22T22:11:08.000+0000 |
Description
Animate callback never gets called if you use Ti.UI.createAnimation. It get called if you use an object instead.
Step 1: Run the code below
Step 2: click the window
Step 3: notice that the info statement never shows
Step 4: in animate() replace 'animation' with 'animationObj'.
Step 5: run code
Step 6: click the window
Step 7: notice the info statement in the callback shows up.
var win = Ti.UI.createWindow({
backgroundColor:'blue'
});
win.addEventListener('click',function(e){
Ti.API.info('CLICKED');
var animation = Ti.UI.createAnimation({
backgroundColor:'red',
duration: 500
});
var animationObj = {backgroundColor:'red', duration:2000};
win.animate(animation, function(){
Ti.API.info('DONE!!!');
});
});
win.open();
HD ticket: appc.me/c/APP-321655
Closing ticket as duplicate and links to the related ticket have been provided above.