Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19764] previewContext does not work when set while modal window is open or closing

GitHub Issuen/a
TypeBug
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labels3dtouch
ReporterFokke Zandbergen
AssigneeUnknown
Created2015-10-22T14:53:57.000+0000
Updated2018-10-03T11:07:57.000+0000

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. This happens only with Camera, Photo Gallery or another modal window. If non-modal window is open while we set previewContext it does work. Sample code: https://github.com/appcelerator-developer-relations/appc-sample-3dtouch/blob/master/app/controllers/list.js#L81

Comments

  1. Hans Knöchel 2015-10-22

    [~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. And 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.
  2. Fokke Zandbergen 2015-10-22

    Or we could wait to call the callbacks until the UIViewControllers are closed. Yes, 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.
  3. Hans Knöchel 2015-10-22

    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.

JSON Source