-
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
Refresh Card View on view resize #39
Comments
Do you mean creating height constraints for objects inside the cardView? Are you using the |
I added an NSLayoutConstraint on cardSwiper view height and in didSwipeCardAway, I am updating the height constraint. After updating the cell should opt to new constraints. I have made some changes to the existing project. |
So are you saying that the cards don't adapt their size right away once you swipe one away for the first time? So does adding the following line: cardSwiper.verticalCardSwiperView.layoutIfNeeded() below the line where you update the constraint (kind of) fix it for you? (just so I understand what you're talking about) |
Yes, I see it now, alright I'll look into what's causing this sometime when I get the time for it. |
Hi @mohit196 Quick question, did you try my previous solution? If I call func didSwipeCardAway(card: CardCell, index: Int, swipeDirection: SwipeDirection) {
cardViewHeightConstraint.constant = 600.0
cardViewHeightConstraint.priority = .required
cardSwiper.layoutIfNeeded()
} |
Yes, and the issue still exists. I tried: |
New Issue Checklist
Issue Description
Right now If I am resizing the cardView the card cells are not adjusting to the new frame.
Steps:
on reloading the CardView it is still giving me some random behavior because of the previous collection view height.
Environment
The text was updated successfully, but these errors were encountered: