B4i Library GestureRecognizer - Native UIGestureRecognizer

Discussion in 'iOS Libraries' started by narek adonts, Apr 13, 2015.

  1. kc1

    kc1 Member Licensed User

    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
     
  2. narek adonts

    narek adonts Well-Known Member Licensed User

    I have forgot to update the version number ) will fix it. Thank you
     
  3. dbalman

    dbalman Member Licensed User

    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?
     
  4. narek adonts

    narek adonts Well-Known Member Licensed User

    AddLongPressGesture
     
  5. dbalman

    dbalman Member Licensed User

    Ah! That works perfectly with 0 taps, 1 touch, and a duration of 0.05. Thanks Narek!
     
  6. JackKirk

    JackKirk Well-Known Member Licensed User

    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.
     

    Attached Files:

    Last edited: Apr 29, 2017
    CaptKronos likes this.
  7. iCAB

    iCAB Well-Known Member Licensed User

    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
     
  8. Moncai

    Moncai Member Licensed User

    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)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice