How to add pan-gesture swiping to SwiftUI Chat App

Hi,

I completed the SwiftUI Chat App and I would like to add pan-gesture swiping to it. Based on looking at this app, where can I implement the pan-gesture (swiping sequence)? I understand you are limited with time etc, but if you could please give me a suggestion as to which files it needs to be connected to (ex. like the DatabaseService, etc.), I would definitely appreciate it.

I have the code for the pan-gesture swiping (essentially it’s just a bunch of cards that you can swipe right/left but I’m trying to see how I can convert those cards into users). I can send it over to you via GitHub for a better understanding, thanks.

1 Like

What does the gesture do??? Depending on that, you would add the code to that part

As clearly mentioned above, this pan-gesture is supposed to swipe users either right or left. An example would be like tinder, etc.

Hello, I’m still waiting for a response. Please let me know, thanks.

I’m not sure how you will add the pan-gesture to the chat app. but if you want to know how to implement it using SwiftUI you may want to check this video from Indently.

How to create Tinder Card Swipes in SwiftUI Tutorial 2022 (iOS)

I used this as reference when creating a flash card app.

Paul Hudson showed how to make a swipe gesture in Project 17 of his course “100 Days of SwiftUI”. Give that a look too.