|
FOROS PROFESIONALES WINDEV, WEBDEV y WINDEV Mobile |
| | | | | |
| [WM22] iOS - Change images programmatically with swipe |
| Iniciado por guest, 12,jul. 2017 17:41 - 1 respuesta |
| |
| | | |
|
| |
| Publicado el 12,julio 2017 - 17:41 |
Good Morning
On Android I changed the image using a this code in the swipe event:
------------------------------------------------------------------
IF Gesture.Direction = RightToLeft AND Gesture.Speed > 500 THEN gnPosition++ ChangePage() END
IF Gesture.Direction = LeftToRight AND Gesture.Speed > 500 THEN gnPosition-- ChangePage() END
------------------------------------------------------------------
But in iOS I can't use the variable Gesture.Direction and Gesture.Speed. Any idea how to recreate this functionality for iOS?
Thanks in advance David Cabrera |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,julio 2017 - 19:05 |
In case someone is in my same situation, I solved that inconvenience with this code.
//-----Global declarations of WIN-----//
gnXDown is int gnXUp is int gtHoraDown is Time gtHoraUp is Time
//-----Pressed/Left button down of IMG-----//
gnXDown = MouseXPos() gtHoraDown = TimeSys()
//-----Released/Left button up of IMG-----//
gnXUp = MouseXPos() gtHoraUp = TimeSys()
Duracion is Duration = gtHoraUp - gtHoraDown
IF Duracion..Millisecond <= 130 THEN IF gnXDown < gnXUp THEN IF (gnXUp - gnXDown) > 50 THEN // Code of swife Left to Right END END
IF gnXDown > gnXUp THEN IF (gnXDown - gnXUp) > 50 THEN // Code of swife Right to Left END END END |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|