iOS Question Integrate webview swipe

microbox

Active Member
Licensed User
Longtime User
Hi, I'm new in B4i, I trying to find a way to refresh webview content when swipe gesture is detected. Can anyone share an example or link.

Thanks.
 

watesoft

Active Member
Licensed User
Longtime User
Hi, I'm new in B4i, I trying to find a way to refresh webview content when swipe gesture is detected. Can anyone share an example or link.

Thanks.

You can use gesturerecognizer libraryhttps://www.b4x.com/android/forum/threads/gesturerecognizer-native-uigesturerecognizer.52836/

B4X:
Dim grSwipe As GestureRecognizer

Sub grswipe_Swipe(state As Int,attributes As Swipe_Attributes)
        Select attributes.Direction
            Case grSwipe.SWIPE_Direction_Left
                If mywebview.CanGoForward Then  mywebview.GoForward
            Case grSwipe.SWIPE_Direction_Right
                If mywebview.CanGoBack Then   mywebview.goBack     
        End Select
End Sub
 
Upvote 0
Top