MobileCanvas multi-touch example

Yeah, API2 for iOS is a disaster in my opinion. But that’s a separate thread.

Enabling user interaction wasn’t something done with API1 controls either. Still missing after 6-7 years of Xojo iOS

Thanks Jeremie,
I added that to the SwipeView but still no events firing as Mr. Tait also experienced.

This really feels ike it is something that should be baked into the Xojo canvas.

Yes, it stresses me out that the events and methods change in a way I’m not positive how to rework, but the old objects are deprecated.

Correction… it appears to work on a real device, but NOT in the simulator (Grrr)

final note:
I’ve made a mess of this in trying to get it working (which it is now) so I will try to make time to clean it up and post it back.
However just be aware if you are doing this yourself you will also need to update the paint event to pass “g as graphics” and update EditableIOSImage to use Picture and Graphics.

alright… so tap, pinch, and swipeDown(etc) work.

TouchesBegan, TouchesEnded, TouchesMoved never fire. Any thoughts on how to make those work?

I think that those events don’t happen if you enable gesture recognitizers but do happen if you don’t enable them. I’ll be honest I don’t remember though

Well maybe I’m looking for the wrong thing.
There seems to be no way to capture a single figure drag or when a pinch ends.

Use a Pan gesture recognizer for that with one finger I believe.

I see now that the Pan gesture recognizer is not implemented… whoops

Well I appreciate the info anyway. This should really be part of Xojo itself.
I know people do well implementing declares, but of course some of use migrated to Xojo to avoid Xcode (or code warrior back in the day).