Open MateuszW13 opened 4 years ago
The reason why it probably doesn't do anything is because cards.count
probably is out of bounds (zero based index in array so you have to do cards.count - 1
, the underlying function actually checks for this and will not scroll if you're out of bounds.
That said, if you use it with UIView.animate
it currently seems to be very buggy... like this:
so that's something that definitely needs fixing.
Yup, I came to this point as well. Is there any other way to reduce this animation speed or fix the buggy part ?
Apparently, using UIView.animate()
doesn't work properly on a normal collectionview either. It has something to do with cell creation. Also, setting the animated parameter to false also doesn't execute the actual animation code, which is probably what's happening here.
Have you tried wrapping it inside a CATransaction
?
See this comment here:
https://stackoverflow.com/a/16693712/6863743
It's in objective-c but shouldn't be hard to translate to swift.
edit: nvm probably won't work but worth a shot.
I have tried this solution as well and still it is not working :(
New Issue Checklist
Question
Is it possible to slow down the animation of scrollToCard(at:animated) method ? I was trying to slow it done with:
and
and both of the methods don't seem to work for me.