{ "id": "152254", "key": "TIMOB-19764", "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": null, "resolutiondate": null, "created": "2015-10-22T14:53:57.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "3dtouch" ], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-10-03T11:07:57.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "In the 3D Touch sample app we have to use a {{setTimeout()}} of ~500ms to delay the rendering of the list (and as part of that setting the previewContext on each thumbnail) after finishing selecting a picture from the device's Photo Gallery. If we don't than Peek and Pop will not work.\r\n\r\nThis happens only with Camera, Photo Gallery or another modal window. If non-modal window is open while we set previewContext it does work.\r\n\r\nSample code: https://github.com/appcelerator-developer-relations/appc-sample-3dtouch/blob/master/app/controllers/list.js#L81", "attachment": [], "flagged": false, "summary": "previewContext does not work when set while modal window is open or closing", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 5.1.0", "comment": { "comments": [ { "id": "367565", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~fokkezb] Does it only happen to those or also in other modal dialogs (e.g. {{Ti.UI.iOS.NavigationWindow}}). Because I think, the cleanest (and closest way to the native implementation) would be, to have close events on the camera and photo gallery dialogs (as well as contact picker as far as I think), since they all are {{UIViewController}}'s. \r\n\r\nAnd when we have this ones, we place the code inside the close event, to make the sure transitions do not overlay. I think thats the quickest, but the cleanest solution here.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-10-22T20:43:57.000+0000", "updated": "2015-10-22T21:12:05.000+0000" }, { "id": "367570", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Or we could wait to call the callbacks until the UIViewControllers are closed.\r\n\r\nYes, indeed the same is true when a regular modal window is open while the previewcontext is set. If it's a regular window it does work.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-10-22T21:07:33.000+0000", "updated": "2015-10-22T21:07:33.000+0000" }, { "id": "367571", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Just what i thought of, because the modal transition takes longer. So a) fire the \"success\" callback after the view controllers are closed or b) provide a \"close\" callback instead. No rush here, let's compare the pros and cons.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-10-22T21:09:58.000+0000", "updated": "2015-10-22T21:12:17.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }