Skip to content
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

Stop Left Swipe || Increase Card Size #72

Closed
veersr9 opened this issue Aug 6, 2020 · 1 comment
Closed

Stop Left Swipe || Increase Card Size #72

veersr9 opened this issue Aug 6, 2020 · 1 comment
Labels

Comments

@veersr9
Copy link

veersr9 commented Aug 6, 2020

How do I stop only left swipe. If I am doing this ->

func willSwipeCardAway(card: CardCell, index: Int, swipeDirection: SwipeDirection) {

    switch swipeDirection{
    case SwipeDirection.Right:
        if index < arrayHome.count {
            arrayHome.remove(at: index)
        }
    default:
        print("do nothing because be we didn't drag left")
    }
}

-> But this is freezing the screen . And How can I increase card size.

@JoniVR
Copy link
Owner

JoniVR commented Aug 6, 2020

I don't think there's a way to block a swipe to either side as of yet. What exactly are you looking for? Should the card just animate back or not move in that direction at all?

As for increasing the card size, you can use sizeForItem or change the topInset and sideInset properties.

@veersr9 veersr9 closed this as completed Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants