Apr 13, 2015 Replies: 27 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 GestureRecognizer.bas GestureRecognizer.bas 11.1 KB · Views: 440 GestureRecognizer.zip GestureRecognizer.zip 5.5 KB · Views: 502 Last edited: Jun 22, 2015 Click to expand...
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
K kc1 Member Licensed User Longtime User Jun 22, 2015 #21 Narek, Thank you for the example! I'll give it a try later. In the mean time, I noticed the version number in GestureRecognizer.bas was not updated to 1.2. It still says 1.1 although the content is different than the one in the example. I thought I'd mention this in case you meant to change the version number but forgot to do so Thank you once again! KC
Narek, Thank you for the example! I'll give it a try later. In the mean time, I noticed the version number in GestureRecognizer.bas was not updated to 1.2. It still says 1.1 although the content is different than the one in the example. I thought I'd mention this in case you meant to change the version number but forgot to do so Thank you once again! KC
narek adonts Well-Known Member Licensed User Longtime User Jun 22, 2015 #22 I have forgot to update the version number ) will fix it. Thank you
dbalman Member Licensed User Longtime User Oct 24, 2016 #23 narek adonts said: I added a small project with examples (see first post) Click to expand... Great Library! Thanks for sharing it. How would I add just a touch event that fires when the view is touched - no matter what gesture may or may not be being used?
narek adonts said: I added a small project with examples (see first post) Click to expand... Great Library! Thanks for sharing it. How would I add just a touch event that fires when the view is touched - no matter what gesture may or may not be being used?
dbalman Member Licensed User Longtime User Oct 25, 2016 #25 narek adonts said: AddLongPressGesture Click to expand... Ah! That works perfectly with 0 taps, 1 touch, and a duration of 0.05. Thanks Narek!
narek adonts said: AddLongPressGesture Click to expand... Ah! That works perfectly with 0 taps, 1 touch, and a duration of 0.05. Thanks Narek!
JackKirk Well-Known Member Licensed User Longtime User Apr 29, 2017 #26 I was having some troubles coming to grips with narek's class so I spent a day tidying it up and netting it down to its bare essentials. I changed the example wrapper so that I could individually analyse how each gesture was handled. I then added a mashup example of all gestures to the example wrapper with some simple ideas as to how to avoid gesture "collisions". I've asked narek if he would mind my publishing this effort - he was positive with the caveat that I change the classes name to avoid confusion. Please find the XGestureRecognizer class with example wrapper attached. The example wrapper has the mashup exposed by default - there are simple instructions in the example wrapper that allow you to expose the individual gesture examples instead. Attachments XGestureRecognizer.zip XGestureRecognizer.zip 7.5 KB · Views: 54 Last edited: Apr 29, 2017
I was having some troubles coming to grips with narek's class so I spent a day tidying it up and netting it down to its bare essentials. I changed the example wrapper so that I could individually analyse how each gesture was handled. I then added a mashup example of all gestures to the example wrapper with some simple ideas as to how to avoid gesture "collisions". I've asked narek if he would mind my publishing this effort - he was positive with the caveat that I change the classes name to avoid confusion. Please find the XGestureRecognizer class with example wrapper attached. The example wrapper has the mashup exposed by default - there are simple instructions in the example wrapper that allow you to expose the individual gesture examples instead.
I iCAB Well-Known Member Licensed User Longtime User Jan 2, 2018 #27 Hi Guys I am just wondering if anyone else is facing issues with this class. Tap event not raised all the time ( in my case on average, 1 out of 10 fails) In particular to be more specific, I am trying to simulate touch panel up event. By pressing down on a panel and releasing after few seconds. Thanks in advance
Hi Guys I am just wondering if anyone else is facing issues with this class. Tap event not raised all the time ( in my case on average, 1 out of 10 fails) In particular to be more specific, I am trying to simulate touch panel up event. By pressing down on a panel and releasing after few seconds. Thanks in advance
Moncai Member Licensed User Longtime User Jan 26, 2018 #28 Narek, thank you for making this wrapperclass, saves a lot of work! I had to make minor adjustments to make it work and I'd like to share my two bugfixes: Code: Private Const mSwipeDirectionLeft=2 Everywhere you use "Private Const", the editor advises it is implicitly typed as string, so I added "As Int". Code: Private Const mSwipeDirectionLeft As Int = 2 And also Code: Type LongPress_Attributes(NumberOfTaps As InputStream, NumberOfTouch As Int, X As Float, Y As Float, Obj As Object) InputStream should be Int Code: Type LongPress_Attributes(NumberOfTaps As Int, NumberOfTouch As Int, X As Float, Y As Float, Obj As Object)
Narek, thank you for making this wrapperclass, saves a lot of work! I had to make minor adjustments to make it work and I'd like to share my two bugfixes: Code: Private Const mSwipeDirectionLeft=2 Everywhere you use "Private Const", the editor advises it is implicitly typed as string, so I added "As Int". Code: Private Const mSwipeDirectionLeft As Int = 2 And also Code: Type LongPress_Attributes(NumberOfTaps As InputStream, NumberOfTouch As Int, X As Float, Y As Float, Obj As Object) InputStream should be Int Code: Type LongPress_Attributes(NumberOfTaps As Int, NumberOfTouch As Int, X As Float, Y As Float, Obj As Object)