{ "id": "175589", "key": "AC-6612", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": null, "resolutiondate": null, "created": "2020-10-01T23:20:25.000+0000", "labels": [ "animation", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-10-01T23:22:42.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "Overriding an animation on iOS sometimes does not work correctly. The following example, when tapping the window, should show a black view moving from left to right. \r\n\r\nWhen reaching about the middle of the screen, another animation should override the first and move the view back again. \r\n\r\nOn Android it works as expected, on iOS the view pauses, jumps to the right side of the screen, animates a smal distance and finally jumps back to the left side of the screen.\r\n\r\n{code}\r\nconst win=Ti.UI.createWindow({\r\n\tbackgroundColor:'white'\r\n});\r\n \r\nconst view=Ti.UI.createView({\r\n\tleft:0,\r\n\twidth:100,\r\n\theight:100,\r\n\tbackgroundColor:'black',\r\n\toverrideCurrentAnimation:true //this is for Android\r\n});\r\nwin.add(view); \r\n \r\nconst animate=(forward,duration)=>{\r\n\tview.animate({\r\n\t\tleft:forward ? win.size.width-view.size.width : 0,\r\n\t\tcurve:Ti.UI.ANIMATION_CURVE_LINEAR,\r\n\t\tduration:duration\t\r\n\t});\r\n};\r\n \r\nconst button=Ti.UI.createButton({\r\n\ttitle:'Start',\r\n\tbottom:100\r\n});\r\nbutton.addEventListener('click',()=>{\r\n\tanimate(true,2000); //animate the view from left to right with a duration of 2000 ms...\r\n\tsetTimeout(()=>animate(false,2000),1000); //... but after 1000 ms we override to animate back again\r\n});\r\nwin.add(button); \r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: Animation override not working correctly", "creator": { "name": "mj", "key": "mj", "displayName": "martin", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "mj", "key": "mj", "displayName": "martin", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS using Ti SDK 9.2.0", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }