{ "id": "92588", "key": "TIMOB-9326", "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": [], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2021-05-21T21:28:50.000+0000", "created": "2012-05-30T21:49:15.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "core", "easy-fix", "reprod" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "59266", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "outwardIssue": { "id": "173743", "key": "TIMOB-27236", "fields": { "summary": "iOS: Animating view width/height from 0 doesn't work", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": null, "updated": "2021-05-21T21:28:50.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": "If the height of a view is set to zero it will not animate, even to a larger height.\r\n\r\nh4. Steps to reproduce:\r\nStep 1: run the code below\r\nStep 2: click on the \"shrink\" button\r\nStep 3: notice the blue view shrink\r\nStep 4: click the \"expand\" button\r\nStep 5: notice the blue view does not expand\r\nStep 6: if you replace the 0 height with another number greater than zero, the animation will work as expected\r\n\r\n{code:js}\r\nvar win2 = Ti.UI.createWindow({\r\n\tbackgroundColor: 'green'\r\n});\r\nwin2.open();\r\n\r\nvar view = Ti.UI.createView({\r\n\tbackgroundColor: 'blue',\r\n\ttop: 200,\r\n\theight: 200,\r\n\twidth: 200\r\n});\r\nwin2.add(view);\r\n\r\nvar b1 = Ti.UI.createButton({\r\n\ttitle: 'shrink',\r\n\ttop: 5,\r\n\tleft: 5\r\n});\r\nb1.addEventListener(\"click\", function(){\r\n\tview.animate({\r\n\t\theight: 0,\r\n\t\tduration: 500\r\n\t}, function(){\r\n\t\tTi.API.info('shrink complete');\r\n\t});\r\n});\r\nwin2.add(b1);\r\n\r\nvar b2 = Ti.UI.createButton({\r\n\ttitle: 'expand',\r\n\ttop: 5,\r\n\tleft: 200\r\n});\r\nb2.addEventListener(\"click\", function(){\r\n\t// workaround\r\n\t// view.height = 1;\r\n\tview.animate({\r\n\t\theight: 200,\r\n\t\tduration: 500\r\n\t}, function(){\r\n\t\tTi.API.info('expand complete');\r\n\t});\r\n});\r\nwin2.add(b2);\r\n{code}\r\n\r\nh4. Workaround:\r\nSet the height of the view to a number greater than 0 before animating (see the example).", "attachment": [], "flagged": false, "summary": "iOS: View - will not animate if height is 0 (zero)", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 2.0.1.GA2\r\niOS Simulator 5.0", "comment": { "comments": [ { "id": "203121", "author": { "name": "lutz.bayer", "key": "lutz.bayer", "displayName": "Lutz Bayer", "active": true, "timeZone": "Europe/Berlin" }, "body": "I can confirm this Bug. It also appears if you want so start an animation on an view and view-height of value zero.\r\n\r\n@API: SDK 2.1.0.GA\r\n@iOS: 5.1\r\n@OS: Mac Lion (10.7.4)", "updateAuthor": { "name": "lutz.bayer", "key": "lutz.bayer", "displayName": "Lutz Bayer", "active": true, "timeZone": "Europe/Berlin" }, "created": "2012-07-13T07:26:17.000+0000", "updated": "2012-07-13T07:27:25.000+0000" }, { "id": "244869", "author": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Issue reproduces \n\nTested with\n\nTitanium Studio, build: 3.0.1.201212181159\nTitanium SDK version: 3.1.0 \nTitanium SDK version: 3.0.2 \niOS iPhone Simulator: iOS SDK version: 6.0", "updateAuthor": { "name": "jithinv@exalture.com", "key": "jithinv@exalture.com", "displayName": "jithinpv", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-04-01T11:29:23.000+0000", "updated": "2013-04-01T11:29:23.000+0000" }, { "id": "249674", "author": { "name": "shawncberg", "key": "shawncberg", "displayName": "Shawn Berg", "active": true, "timeZone": "America/New_York" }, "body": "I'm running into the same exact issue. Any ETA on a resolution?\r\n\r\nApplication Type: mobile\r\nTitanium SDK: 3.1.0GA\r\nPlatform: iOS 6.1\r\nDevice: iOS Simulator\r\nHost OS: Max OSX 10.8.3\r\nTitanium Studio: 3.1.1.201304291957", "updateAuthor": { "name": "shawncberg", "key": "shawncberg", "displayName": "Shawn Berg", "active": true, "timeZone": "America/New_York" }, "created": "2013-05-01T02:49:11.000+0000", "updated": "2013-05-01T02:49:11.000+0000" }, { "id": "289712", "author": { "name": "levani", "key": "levani", "displayName": "levani", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue is still unresolved on Ti 3.2.0GA. At least on ios 7.", "updateAuthor": { "name": "levani", "key": "levani", "displayName": "levani", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-25T06:11:22.000+0000", "updated": "2014-01-25T06:11:22.000+0000" }, { "id": "422674", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am able to reproduce this issue with the following environment;\r\niPhone 7 (10.2)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1.v20170620103414\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.1\r\nTi CLI 5.0.13\r\nAlloy 1.9.11\r\nArrow 2.0.0\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-23T20:28:28.000+0000", "updated": "2017-06-23T20:28:28.000+0000" }, { "id": "434778", "author": { "name": "gduthieuw", "key": "gduthieuw", "displayName": "Guile", "active": true, "timeZone": "Europe/Berlin" }, "body": "This bug still appears...", "updateAuthor": { "name": "gduthieuw", "key": "gduthieuw", "displayName": "Guile", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-02-22T16:39:16.000+0000", "updated": "2018-02-22T16:39:16.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }