-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I prevent my view controller from loading twice when I use the didDragCard function? #68
Comments
Hi, This is intended behaviour. The Depending on what you want to achieve exactly, you could either use the I could perhaps implement something like a My guess would be your best bet is to use either the If I'm overlooking something here, let me know what it is you want to achieve (aka when exactly you want to receive a dragging notification or what you're missing). |
I agree that using the ** willSwipeCardAway** or didSwipeCardAway functions will ensure that the card is only being dragged once, although the issue is that I still want the card to be available after swiping left. This way, once the user is done viewing the new view controller that swiping a card produces, he/she has the ability to go back and view the card they swiped on. |
Makes sense, do you have any suggestions? Perhaps we could add an extra |
Hmm...I think that is a good idea. Although, when would I as a developer know where to re-enable swiping once the card is visible again? |
You'd want to re-enable it when you dismiss the new ViewController right? Plenty of ways of doing that, you could use a delegate callback or notification (observer) to re-enable it once you dismiss the viewcontroller for example. |
New Issue Checklist
Question
Hi, I am overriding the didDragCard method and I essentially want a custom view controller I created to display upon dragging the card to the left. The issue arises after swiping the card, where the view controller is being pushed twice rather than only once. Here is my code:
`func didDragCard(card: CardCell, index: Int, swipeDirection: SwipeDirection) {
As mentioned, the function works although the view controller is pushed onto my view twice. I noticed that when I lightly drag the card (barely even dragging it) the expected behavior occurs (the view is only pushed once). But if I do a long drag in the left direction, the view is pushed multiple times.
The text was updated successfully, but these errors were encountered: