diff --git a/VegaScroll.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/VegaScroll.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/VegaScroll.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/VegaScroll/Classes/VegaScrollFlowLayout.swift b/VegaScroll/Classes/VegaScrollFlowLayout.swift index 7d335ce..bbc470d 100644 --- a/VegaScroll/Classes/VegaScrollFlowLayout.swift +++ b/VegaScroll/Classes/VegaScrollFlowLayout.swift @@ -119,7 +119,7 @@ open class VegaScrollFlowLayout: UICollectionViewFlowLayout { let touchLocation = collectionView!.panGestureRecognizer.location(in: collectionView) - dynamicAnimator.behaviors.flatMap { $0 as? UIAttachmentBehavior }.forEach { behavior in + dynamicAnimator.behaviors.compactMap { $0 as? UIAttachmentBehavior }.forEach { behavior in let attrs = behavior.items.first as! UICollectionViewLayoutAttributes attrs.center = getUpdatedBehaviorItemCenter(behavior: behavior, touchLocation: touchLocation) self.dynamicAnimator.updateItem(usingCurrentState: attrs)