No.
I want to know the difference between someone pinching or spreading, and how much. I want to know if they are dragging something.
I can figure out how to evaluate the events to implement this but I also really want it to feel natural on an iOS device. Figuring out the different pressure intent or the difference between a spread or moving something with 2 fingers isn’t necessarily straight forward.
I wish it were there too.
I’m rubbish with declares on iOS, so inseams out of my reach to implement myself.
I guess I need to do it with “maximum effort” - Deadpool
Quite possibly. The changes with API2 were quite extensive but also didn’t allow easy find&replace to fix which is extremely frustrating for a large project. If anyone is able to test replacing iOSView references with MobileScreen to see if that resolves the issues please let me know.
and I lied. I was catching a separate breakpoint that mislead me.
I don’t know that it’s not working yet. I am not positive of how to implement.
ive dragged a tap recognizer to the window. It doesn’t do anything on its own.
I tried the AddGestureRecognizer method but it crashes the app.
There is a SwipeView in the Extensions module that has pretty much every gesture recognizer on it, in addition to supporting device shake events and letting you draw on it like a canvas. That might be a good place to start seeing how to use them?
In general you create a gesture recognizer and attach it to the view/control with AddGestureRecognizer, then you need to use AddHandler to handle the events for when something happens.
You use iOSMobileUserControl which has an event CreateView.
Inside this event the self.width and self.height are 0. I guess it’s being created before the screen has defined it’s size?
The Xojo documentation says to use MobileUIControl rather than iOSUserControl, which has different events (opening rather than open, and no CreateView).
I tried to merge those two events into opening but when I put the swipeView into a screen the debugger complains that the first control needs to be an iOSView or IOSMobileUserControl…
I had to move the open and create view into a single method and make sure to call it after the screen has fully shown itself.
The tap gesture fires an event, but the pinch does not.
Declare Sub userInteractionEnabled Lib "UIKit" Selector "setUserInteractionEnabled:" _
(obj As ptr, value As Boolean)
userInteractionEnabled(theUIControl.Handle, true)
‘You might have to explicitly enable user interaction’
Every post in this thread makes it feel more and more complicated…
I had similar issues to Chris in that although Mobilennn classes should be drop in replacements for IOSnn classes, they really aren’t there just yet.