iOS Question Multitouch event?

Discussion in 'iOS Questions' started by JordiCP, Dec 8, 2017.

  1. JordiCP

    JordiCP Well-Known Member Licensed User

    I have tested the GestureRecognizer class/examples and it's great.

    However, I would need for my app to receive the multitouch pointer events from a view, in a similar way as it is done in B4A GestureDetector, in order to customise its behaviour.

    Is it possible in B4I?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    upload_2017-12-10_11-14-46.png

    Project is attached. Note that it depends on the latest version of XUI library.

    It replaces all of the panel touch events with multi-touch versions.
     

    Attached Files:

    narek adonts and JordiCP like this.
  3. JordiCP

    JordiCP Well-Known Member Licensed User

    Works really smooth, thanks!

    It seems that it replaces the event in ALL the panels in the app, doesn't matter if you set the multitouchEnabled to True or False in any of them (it seems it is by default), but it's easy to replace the previous _Touch with the new events :)
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    That's true. If needed I can improve it and make it selective based on the multitouch property.
     
    JordiCP likes this.
  5. JordiCP

    JordiCP Well-Known Member Licensed User

    I don't really need it, using the new events in all the panels (even if I only need real multitouch in one of them) totally solves my problem

    But I'm curious on how it would be done (just to better understand how everything works ) :)

    Thanks again
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Nothing really interesting. You need to check in the OBJC code whether multitouch is enabled and raise the standard event instead of the multitouch event.
     
    JordiCP 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