File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
LXReorderableCollectionViewFlowLayout Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change 99#import < QuartzCore/QuartzCore.h>
1010#import < objc/runtime.h>
1111
12- #define LX_FRAMES_PER_SECOND 60.0
13-
1412#ifndef CGGEOMETRY_LXSUPPORT_H_
1513CG_INLINE CGPoint
1614LXS_CGPointAdd (CGPoint point1, CGPoint point2) {
@@ -220,7 +218,7 @@ - (void)handleScroll:(CADisplayLink *)displayLink {
220218 UIEdgeInsets contentInset = self.collectionView .contentInset ;
221219 // Important to have an integer `distance` as the `contentOffset` property automatically gets rounded
222220 // and it would diverge from the view's center resulting in a "cell is slipping away under finger"-bug.
223- CGFloat distance = rint (self.scrollingSpeed / LX_FRAMES_PER_SECOND );
221+ CGFloat distance = rint (self.scrollingSpeed * displayLink. duration );
224222 CGPoint translation = CGPointZero;
225223
226224 switch (direction) {
You can’t perform that action at this time.
0 commit comments