Skip to content

feat(ios): add swipeToSeek#750

Open
sterlingwes wants to merge 2 commits into
callstack:mainfrom
sterlingwes:ios-add-swipe-gesture
Open

feat(ios): add swipeToSeek#750
sterlingwes wants to merge 2 commits into
callstack:mainfrom
sterlingwes:ios-add-swipe-gesture

Conversation

@sterlingwes

Copy link
Copy Markdown

Summary:

I noticed on iOS that the slider does not behave as it does on Android when you make a swipe gesture on the track bar away from the thumb. On Android, the thumb snaps to the gesture point of the swipe and follows it along until the gesture ends. This feels more fluid and native, and allows for the user to be less precise in pressing the thumb but still find the precise value they want. tapToSeek doesn't allow for this since it expects a short press, but if a user is trying to grab the thumb and misses, nothing happens because the gesture is a swipe/pan.

I opted to conditionally add a pan gesture recognizer on iOS (which allows for swiping continuously in both directions) to achieve this based on an opt-in boolean prop swipeToSeek. This works fine alongside the existing tap recognizer for when tapToSeek is also enabled.

Test Plan:

In the video below I'm demonstrating how it behaves relative to the tapToSeek behaviour with both steps defined and not. I also show that for sliders where the swipeToSeek prop is not set to true, it won't respond to those swipe gestures.

Screen.Recording.2025-12-14.at.8.56.19.PM.mov

I also verified the event handlers work the same by temporarily toggling the prop in these prop examples:

onSlidingStart / onSlidingComplete BEFORE (no swipeToSeek)
Screen.Recording.2025-12-14.at.9.08.14.PM.mov
onSlidingStart / onSlidingComplete AFTER (with swipeToSeek)
Screen.Recording.2025-12-14.at.9.13.58.PM.mov

@sterlingwes

Copy link
Copy Markdown
Author

Seeking review from @BartoszKlonowski I think, whenever you have a moment? 🙏🏻🙇🏻‍♂️

@BartoszKlonowski BartoszKlonowski self-requested a review January 12, 2026 12:13
@sterlingwes

Copy link
Copy Markdown
Author

hi @draggie i notice you're in the middle of a rewrite of the library. Are you considering open issues like this in that or just working on parity with existing features?

@BartoszKlonowski

BartoszKlonowski commented Jun 30, 2026

Copy link
Copy Markdown
Member

Hello @sterlingwes, thanks for reaching out!
Yes, in general, some time ago I decided to go ahead and rewrite the whole library to make it more up to date with standards (Kotlin, Swift) and to migrate it to new UI also be able to get rid of native limitation current Slider suffers.
Because of that I didn't yet merge all the pending PRs that are, of course, targeting the "old" Slider.
Still, this PR you created will be merged and released along with some other features (like two thumbs by @draggie) in near future, as part of yet Slider v5 (before v6 rewrite kicks in) but because of limited time I have, the ETA for that is still to be figured out.
I totally appreciate all the contributions, including yours 💪 but at the same time I have no choice but to count on your patience 🙏

@sterlingwes

Copy link
Copy Markdown
Author

awesome thanks @BartoszKlonowski for the update 🙏🏻 sounds good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants