B4i Library GestureRecognizer - Native UIGestureRecognizer

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

  1. narek adonts

    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
     

    Attached Files:

    Last edited: Jun 22, 2015
  2. Ph1lJ

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

    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
     
  4. Brian Robinson

    Brian Robinson Active Member Licensed User

    I haven't tried it yet, but thank you for your work.
     
  5. Ph1lJ

    Ph1lJ Member Licensed User

    Hi Narek

    Yeap it works well 0- didn't realize it was Loging data.

    Thanks
     
  6. narek adonts

    narek adonts Well-Known Member Licensed User

    update the latest "GestureRecognizer.bas" (see in the first post) to have the new functions.
     
  7. Alberto Iglesias

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

    narek adonts Well-Known Member Licensed User

    For each type of gesture recognizer the touch up event is
    state=yourgr.STATE_END
     
  9. 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:

     
  10. narek adonts

    narek adonts Well-Known Member Licensed User

    Please download the latest GestureRecognizer.bas
    it should fix your issue
     
  11. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    I have the gesturerecognizer.bas 1.1, I can´t see any new version....
    :-(
     
  12. narek adonts

    narek adonts Well-Known Member Licensed User

    I have updated it but forgot to change the version. Just download it.
     
  13. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    OK... I just try to download again right now....
     
  14. narek adonts

    narek adonts Well-Known Member Licensed User

    it worked?
     
  15. narek adonts

    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
     
  16. Alberto Iglesias

    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!
     
  17. narek adonts

    narek adonts Well-Known Member Licensed User

    Great ))
    I will update the Gesture Recognizer Class soon to support all the the native features.

    Narek
     
  18. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Narek,

    Thanks for your super help!
     
  19. kc1

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

    narek adonts Well-Known Member Licensed User

    I added a small project with examples (see first post)
     
    dbalman likes this.
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