[TIMOB-20020] iOS: Change source of peek and pop events to the (child) view force-touched on
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2016-07-13T21:32:40.000+0000 |
Affected Version/s | Release 5.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | 3dtouch |
Reporter | Fokke Zandbergen |
Assignee | Hans Knöchel |
Created | 2015-11-19T20:15:13.000+0000 |
Updated | 2016-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.
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! :-)
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.
Closing for now, following the discussion above. Thanks!