kabiri 3 Posted January 7, 2023 Sometimes in IOS when I open the form, the Gesture event does not happen. But in Android this event always happens. I have a form on which I have placed the GestureManager component I have selected it in the Touch section and only the Pan option is enabled. In the event of closing the form, I have acted as follows: Action:=TCloseAction.caFree; And I create it every time before the show. In the Gesture event, I have acted like this if EventInfo.GestureID = igiPan then begin Handled := True; if TInteractiveGestureFlag.gfBegin in EventInfo.Flags then begin fPanPoint := EventInfo.Location; end else begin // end; if TInteractiveGestureFlag.gfEnd in EventInfo.Flags then begin // end; end But in IOS, this event happens randomly. Do you know what the problem is? If the event happens after displaying the form, the event will happen until I close the form. If the event doesn't happen after displaying the form, the event won't happen until I close the form. Share this post Link to post
programmerdelphi2k 237 Posted January 7, 2023 have you see the sample on RAD Help ? : Topic "FMXInteractiveGestures (Delphi)" sample to "PAN" ... "Here is the event handler when the GestureID = igiPan" Share this post Link to post
kabiri 3 Posted January 8, 2023 I wrote a simple program before and it was running well. I did exactly the same things in the main program, but sometimes when I open the form it works and sometimes it doesn't. In the main form, there are many layers and a rectangle as a background and a 3D view. Even if I hide all of them and the form remains, there is still a problem (only on IOS) I have a tap event on the form that always works. I transferred the components of the previous program to the test program, but the test program works without problems. I have not removed the Gesture event or changed the OnGesture event of the form anywhere in the source. Share this post Link to post
programmerdelphi2k 237 Posted January 8, 2023 if "old layout works", then new should too. Perhaps some component is in front of another that should receive focus. The hittest is disabled, etc... Share this post Link to post
kabiri 3 Posted January 8, 2023 I tried that the rest of the controls do not have hittest equal to true. I assign tap event for the form, which always works even when pan does not work. When I enable all gestures the event always happens (but GestureID is never igipan) Share this post Link to post
kabiri 3 Posted January 8, 2023 Because I did not understand the problem, I wrote with the touch event. Now it works without problems. Share this post Link to post