{ "id": "166550", "key": "TIMOB-24474", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "17608", "name": "Release 6.1.0", "archived": false, "released": true, "releaseDate": "2017-05-26" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2017-03-13T20:45:41.000+0000", "created": "2017-03-10T16:11:56.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "api", "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2017-03-14T16:33:49.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Animate view's opacity with animate({}) method don't change the opacity property of the view.\r\nTest code and video attached\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n\twidth : 100,\r\n\theight : 100,\r\n\tbackgroundColor : \"red\",\r\n\topacity : 1.0\r\n});\r\n\r\n\r\nvar label = Ti.UI.createLabel({\r\n\twidth : Ti.UI.FILL,\r\n\ttop : 30,\r\n\tcolor : \"red\",\r\n\ttextAlign : \"center\",\r\n\tfont : {\r\n\t\tfontSize : 20\r\n\t}\r\n});\r\n\r\n\r\nvar buttons = Ti.UI.iOS.createTabbedBar({\r\n\tbottom : 30,\r\n\tlabels : [\"Without animate\",\"With animate\"],\r\n\tindex : 0,\r\n\ttintColor : \"red\"\r\n});\r\n\r\nvar temp = true;\r\nsetInterval(function(e){\r\n\t\r\n\tif(temp){\r\n\t\tif(buttons.index == 0)\r\n\t\t\tview.opacity = 0.0;\r\n\t\telse\r\n\t\t\tview.animate({ opacity : 0.0 , duration : 0});\r\n\t}else{\r\n\t\tif(buttons.index == 0)\r\n\t\t\tview.opacity = 1.0;\r\n\t\telse\r\n\t\t\tview.animate({ opacity : 1.0 , duration : 0});\r\n\t}\r\n\ttemp = !temp;\r\n\t\r\n\tlabel.text = \"view opacity: \" + view.opacity;\r\n\t\r\n},200);\r\n\r\n\r\n\r\nwin.add(label,view,buttons);\r\nwin.open();\r\n{code}", "attachment": [ { "id": "61826", "filename": "testopacityanimate.mov", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2017-03-10T16:10:43.000+0000", "size": 2567287, "mimeType": "video/quicktime" } ], "flagged": false, "summary": "iOS: Animate object's opacity with animate({}) method don't change the opacity property", "creator": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "environment": "Appcelerator Studio, build: 4.8.1.201612050850\r\nTitanium SDK 6.0.2 , tested on iOS", "comment": { "comments": [ { "id": "411319", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "I can verify the issue with the given code in SDK 6.0.2.GA.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-03-10T19:18:32.000+0000", "updated": "2017-03-10T19:18:32.000+0000" }, { "id": "411362", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8880\r\n\r\nTest-Case (modified from above, also fixing the \"backgroundColor\" one:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"white\"\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n width: 100,\r\n height: 100,\r\n backgroundColor: \"red\",\r\n opacity: 1.0\r\n});\r\n\r\n\r\nvar label1 = Ti.UI.createLabel({\r\n top: 30,\r\n width: Ti.UI.FILL,\r\n textAlign: \"center\",\r\n});\r\n\r\nvar label2 = Ti.UI.createLabel({\r\n top: 50,\r\n width: Ti.UI.FILL,\r\n textAlign: \"center\",\r\n});\r\n\r\nvar buttons = Ti.UI.iOS.createTabbedBar({\r\n bottom: 30,\r\n labels: [\"Without animate\", \"With animate\"],\r\n index: 0,\r\n tintColor: \"red\"\r\n});\r\n\r\nvar temp = true;\r\nsetInterval(function(e) {\r\n\r\n if (temp) {\r\n if (buttons.index == 0) {\r\n view.opacity = 0.0;\r\n view.backgroundColor = \"green\";\r\n \r\n label1.text = \"view opacity: \" + view.opacity;\r\n label2.text = \"view backgroundColor: \" + view.backgroundColor;\r\n } else {\r\n view.animate({\r\n opacity: 0.0,\r\n backgroundColor: \"green\",\r\n duration: 0\r\n }, function() {\r\n label1.text = \"view opacity: \" + view.opacity;\r\n label2.text = \"view backgroundColor: \" + view.backgroundColor;\r\n });\r\n }\r\n } else {\r\n if (buttons.index == 0) {\r\n view.opacity = 1.0;\r\n view.backgroundColor = \"red\";\r\n \r\n label1.text = \"view opacity: \" + view.opacity;\r\n label2.text = \"view backgroundColor: \" + view.backgroundColor;\r\n } else {\r\n view.animate({\r\n opacity: 1.0,\r\n backgroundColor: \"red\",\r\n duration: 0\r\n }, function() {\r\n label1.text = \"view opacity: \" + view.opacity;\r\n label2.text = \"view backgroundColor: \" + view.backgroundColor;\r\n });\r\n }\r\n }\r\n temp = !temp;\r\n\r\n}, 200);\r\n\r\nwin.add(label1, label2, view, buttons);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-03-10T21:57:20.000+0000", "updated": "2017-03-10T21:57:20.000+0000" }, { "id": "411590", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Fix is present in 6.1.0.v20170313134959, test steps can be found in https://github.com/appcelerator/titanium_mobile/pull/8880\r\n\r\n*Environement*\r\n{code:java}\r\nAppcelerator Command-Line Interface, version 6.1.0\r\nIphone 6S OS: 10.0\r\nOperating System Name: Mac OS X El Capitan\r\nOperating System Version: 10.11.6\r\nNode.js Version: 4.6.0\r\nnpm: 4.2.8\r\nXcode: 8.2\r\nAppcelerator Studio: 4.8.1.201612050850\r\n{code}\r\n", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-13T21:37:22.000+0000", "updated": "2017-03-13T21:37:22.000+0000" }, { "id": "412024", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "On http://builds.appcelerator.com/ i see only the 6.1.0.v20170313171259 version", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2017-03-14T08:39:05.000+0000", "updated": "2017-03-14T08:39:05.000+0000" }, { "id": "412025", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "Sorry for the last comment.\r\nThe fix is also present in the newer version 6.1.0.v20170313171259 ?\r\nThanks", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2017-03-14T08:41:56.000+0000", "updated": "2017-03-14T08:41:56.000+0000" }, { "id": "412089", "author": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hey [~nicolomonili] this fix should be present in 6.1.0.v20170313171259 as well", "updateAuthor": { "name": "smohammed", "key": "smohammed", "displayName": "Samir Mohammed", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2017-03-14T16:33:49.000+0000", "updated": "2017-03-14T16:33:49.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }