Closed hstdt closed 7 years ago
Funny, I have the same issue with https://github.com/roberthein/BouncyLayout on iPhone X simulator, iOS 11.0
Hi! I think i know the problem. So to do the bounce animation the code is using UIDynamicAnimator if you are using float values to define the width of the cells when the physics engine is calculating the positions for the cells you will have some problem with rounding that values and over time the value rounded will increase.
To fix this try setting cell sizes with round values, like 200 not 200,34782.
Hope this will help!
@altjordao Thank you. let itemWidth = ( UIScreen.main.bounds.width / 3 - 2 * xInset).rounded(.towardZero)
works well.
you need to round to the nearest whole even number
round(value / 2.0)) * 2
iPad Pro, iOS 11.0