question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Swipe down gesture possible?

See original GitHub issue

Love this library! Though in apps when images are opened in fullscreen, a common gesture to close or dismiss the view is swiping down. I tried to implement fling gesture using react-native-gesture-handler outside this component but failed. Other gesture recognition outside this library works fine like long press, but not fling.

Is there a possible to add a swipe down callback? Thanks!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
intergalacticspacehighwaycommented, Nov 1, 2022

Thanks, @sregg ! Released in 0.3.3

2reactions
sreggcommented, Nov 1, 2022

That’s exactly what I was implementing right now 😄

  useDerivedValue(() => {
    if (scale.value > 1 && !isZoomed.value) {
      isZoomed.value = true;
      if (zoomListContext) runOnJS(zoomListContext.onZoomBegin)();
      if (onZoomBegin) runOnJS(onZoomBegin)();
    } else if (scale.value === 1 && isZoomed.value) {
      isZoomed.value = false;
      if (zoomListContext) runOnJS(zoomListContext.onZoomEnd)();
      if (onZoomEnd) runOnJS(onZoomEnd)();
    }
  }, [zoomListContext, onZoomBegin, onZoomEnd]);

I’ll push a PR in a sec.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling swipe gestures | Apple Developer Documentation
A swipe gesture occurs when a person moves one or more fingers across the screen in a specific horizontal or vertical direction.
Read more >
How to recognize swipe in all 4 directions - Stack Overflow
One by one, select the swipe gesture recognizer, control + drag to your view controller. Insert the name (let us say leftGesture, rightGesture,...
Read more >
Working with Swipe Gesture Recognizers in Swift - Cocoacasts
A swipe gesture recognizer detects swipes in one of four directions, up , down , left , and right . We set the...
Read more >
Different swipe down gesture for top/bottom part of screen
Would it be possible to add more options to swipe gestures depending on where on screen you swipe? For example if you swipe...
Read more >
Tips: How to perform 15 different swipes & gestures for ...
Pick up your iPhone and even without unlocking it, you've got swipe gestures available to you. The regular swipe up to get to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found