Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20020] iOS: Change source of peek and pop events to the (child) view force-touched on

GitHub Issuen/a
TypeImprovement
PriorityNone
StatusClosed
ResolutionWon't Fix
Resolution Date2016-07-13T21:32:40.000+0000
Affected Version/sRelease 5.1.0
Fix Version/sn/a
ComponentsiOS
Labels3dtouch
ReporterFokke Zandbergen
AssigneeHans Knöchel
Created2015-11-19T20:15:13.000+0000
Updated2016-07-13T21:32:40.000+0000

Description

Right now the source property of the [peek](https://appcelerator.github.io/appc-docs/latest/#!/api/Titanium.UI.iOS.PreviewContext-event-peek) and pop events is always the Ti.UI.iOS.PreviewContext instance. It would be useful if this would instead be the (child) view where the user actually force-touched. That way, depending on what child view the user tapped in a view or ListView/TableView item you can change the preview in the peek event and do something else in the pop event. Idea tossed by [~ralcocer] during the 3D Touch Tech Talk.

Comments

  1. Hans Knöchel 2015-11-24

    Thought about this ticket a while now and came to the conclusion, that I would not bring in this behavior because: - the source internally is the preview context as part of the proxy system, we don't specify that - we don't start the peek and pop by any click event, everything is configured and handled before the user even taps the first time. Bringing in the touched view would create abnormal lacks because we need to bubble it up to the events inside the proxies - we bring the force touch properties starting in 5.2.0, you can set an event listener to the view then if you really want to receive the click (!) source and use it wherever you want [~fokkezb] does that make sense? Just want to keep the new API as clean as possible! :-)
  2. Fokke Zandbergen 2015-11-24

    I agree that if this would be a hack in Obj-C/Swift then indeed we should not bring this into ours. Thanks for checking out Hans.
  3. Hans Knöchel 2016-07-13

    Closing for now, following the discussion above. Thanks!

JSON Source