iOS Question Panel Passing Touch Events

stevel05

Expert
Licensed User
Longtime User
Is there a way to get touch events to pass through a panel to Views behind it and optionally consume them?

I can do this in B4a by adding a Touch Listener using reflection.

I have checked that the ExclusiveTouch is not set by default on the B4IPanelView, but the events do not pass through. If it's not possible to consume them the I could use a flag to ignore on subsequent views, but it would be useful.
 

Attachments

  • PanelTouch.zip
    2.2 KB · Views: 219

JackKirk

Well-Known Member
Licensed User
Longtime User
I am in the process of porting a major app from B4A to B4I.

In the B4A app I make extensive use of Informatix's GestureDetector library - I have extolled the virtues of this library elsewhere - in short I find it brilliant.

In the B4A app I can use GestureDetector to (for example) partially overlay a semi transparent scrollable help panel on top of Google Maps - then trap gestures in a "gesture trap" panel above these - then decide what gestures I want to pass down to the help panel and/or Google Maps.

I have had a close look at narek adonts GestureRecognizer class - including doing an extensive tidy up.

GestureRecognizer allows me to trap gestures satisfactorily but I can't find any way to pass gestures to other objects.

Obviously if I was passing gestures to a view entirely under my control then I could fire its relevant gesture events - but this is not much use with something like Google Maps.

Any and all help, comments, suggestions welcome...
 
Last edited:
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
Narek,

Thanks for your interest but your suggestion does not solve the problem.

Imagine this:

(1) I have Google Maps sitting on the RootPanel.
(2) Above this I have another panel - it is semi transparent and contains scrollable help info.
(3) When the user pans the Google Map I want it to pan.
(4) When the user scrolls the help panel I want it to scroll BUT I also want the Google Map to pan.
(5) When the user pinches the Google Map but has none, one or both fingers in the help panel I want the Google Map to zoom.
(6) When the user long taps the help panel I want the help panel to morph to a small help button.
(7) When the user taps the Google Map or the help panel I want to add a marker to the Google Map.

All of this my B4A app does courtesy of Informatix's GestureDetector.

Any and all help, comments, suggestions welcome.
 
Upvote 0
Top