{ "id": "86844", "key": "TIMOB-7778", "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": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-01-28T23:48:32.000+0000", "created": "2012-02-22T15:54:55.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "qe-closed-3.2.3" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-03-12T09:16:47.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": "*The code*\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor: 'gray'\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n\twidth: 320,\r\n\theight: 480,\r\n\ttop: 0,\r\n\tbackgroundColor: 'yellow',\r\n\ttransform: Ti.UI.create2DMatrix()\r\n});\r\n\r\nvar lastMatrix = Ti.UI.create2DMatrix();\r\n\r\nwin.addEventListener('pinch', function(e)\r\n{\r\n\tvar matrix = lastMatrix.scale(e.scale);\r\n\tview.transform = matrix;\r\n});\r\n\r\nwin.addEventListener('touchend', function(e)\r\n{\r\n\twin.backgroundColor = (win.backgroundColor == 'gray') ? 'red' : 'gray';\r\n\tlastMatrix = view.transform; // assign current matrix to last matrix, so it resizes view relative to the grid space instead of the screen space inside the 'pinch' event listener\r\n});\r\n\r\nwin.add(view);\r\n\r\nwin.open();\r\n\r\n\r\n{code}\r\n\r\n*Expected behavior*\r\nWhen you pinch to zoom in/out, you should have a smooth and lag-free experience, just like on the Simulator.\r\n\r\n*Actual behavior*\r\nWhen you actually install this on the device, it seems to be inconsistent. Sometimes when you let go of one finger (while pinching), it fires the 'touchend' event. However other times it seems to fire only when both fingers have been let go. \r\n\r\n\r\n*Notes*\r\n-Tested using TiSDK 1.8.1, 1.8.2.v20120221114636 and 2.0.0.v20120222101634, same behavior on all three SDKs.\r\n-Tested on an iPhone 3GS and iPod Touch 4th Generation both running iOS 5.0.1 \r\n-In the official Apple docs it says (in the 'Overview' section) that both fingers should be let go off, in order to finish the pinch event: https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIPinchGestureRecognizer_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40009283\r\n-I assume to solve this issue a 'pinch end' event should be exposed, or maybe adjust the 'touchend' event to consider multitouch events.\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: The 'pinch' event listener gets fired inconsistently when used with 'touchend'", "creator": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "environment": null, "comment": { "comments": [ { "id": "195309", "author": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "body": "Issue still exists with 2.0.1GA2.", "updateAuthor": { "name": "jyounus", "key": "jyounus", "displayName": "Junaid Younus", "active": true, "timeZone": "Europe/London" }, "created": "2012-05-18T11:37:17.000+0000", "updated": "2012-05-18T11:37:17.000+0000" }, { "id": "296751", "author": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified the fix, hence closing the issue.\r\n\r\nEnvironment used:\r\nDevice : iPhone 5s , iOS version : 7.1\r\nSDK: 3.2.3.v20140311115447\r\nCLI version : 3.2.1\r\nOS : MAC OSX 10.9\r\nAlloy: 1.3.1\r\nACS: 1.0.14\r\nnpm:1.3.2\r\nAppcelerator Studio, build: 3.2.2.201403061827\r\ntitanium-code-processor: 1.1.0\r\nXCode : 5.1 ", "updateAuthor": { "name": "pmishra", "key": "pmishra", "displayName": "Paras Mishra", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-03-12T09:16:32.000+0000", "updated": "2014-03-12T09:16:32.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }