B4i Library GestureRecognizer - Native UIGestureRecognizer

narek adonts

Well-Known Member
Licensed User
Hi,

Added a small project with examples. There are simple ones, you need to hook up them per your needs.


This is a wrapper of UIGestureRecognizer.
All the gesture are supported: Tap, LongPress, Swipe, Pinch, Rotation, Pan, Screen Edge Pan.

See attached example. All the info in the project

Enjoy

Narek

UPDATED: Version 1.1

- getting the X and Y for all the gestures.


UPDATED: Version 1.2

-New function to get the center of a view and to set it
 

Attachments

Last edited:

Ph1lJ

Member
Licensed User
Hi Narek
I'm very interested in this idea, I downloaded and complied the supplied app - alas on get a white page

Do I have to do something else ?

Ph1lj
 

narek adonts

Well-Known Member
Licensed User
In the project that you have downloaded the GestureRecognizer is initiliazied on page1.rootpanel. There us no other view added.
You can add other view and add gesture recognizer on it.

Narek
 

Alberto Iglesias

Well-Known Member
Licensed User
How I get the Touch UP event???

I need this gesture when I release in a CustomListView to simulate a native UIRefresh object.

Thanks

Alberto Iglesias
 

Alberto Iglesias

Well-Known Member
Licensed User
When I put the Gesture Recognizer, the CustomLitView stopping to work

the pan gesture fires the event, but Customlistview is freezing

I need put touch up in this, look:

 

narek adonts

Well-Known Member
Licensed User
If it doesnt work you need to add longpress gesture recognizer instead if pan as maybe there is a conflict with 2 pan gesture recognizer on a scrollview
 

Alberto Iglesias

Well-Known Member
Licensed User
Yeahhh now it works!

I just put in Application_start

gr.Initialize("gr",Me,clv1.AsView)
gr.AddPanGesture(1,1)

and when release the CustomListView I receive this

Pan:state=3

Perfect for me!

Super Thanks!
 

narek adonts

Well-Known Member
Licensed User
Great ))
I will update the Gesture Recognizer Class soon to support all the the native features.

Narek
 

kc1

Member
Licensed User
Narek,

I'd like to use your library, but I'm lost without an example to get me started.

I have several pages in my app, and I would like to be able to swipe left and right to go from one page to another.

These pages have their own modules with a "Show" public sub that can be called from other pages.

Correct if I'm wrong, but I assume I have to initialize a GestureRecognizer object in each of the page modules?

I tried it on my own, but I couldn't make it work. I might not have initialized the GR object correctly.

An example would be very nice :)

Thank you!

KC
 
Top