From c4059147f03695b66a044c16cc4f0ec67d87eae2 Mon Sep 17 00:00:00 2001 From: JayT Date: Mon, 6 Nov 2017 07:56:02 -0800 Subject: [PATCH] Fix: Rounding error gave incorrect section of cell --- Sources/InternalQueryFunctions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/InternalQueryFunctions.swift b/Sources/InternalQueryFunctions.swift index 170da90f..9c724b08 100644 --- a/Sources/InternalQueryFunctions.swift +++ b/Sources/InternalQueryFunctions.swift @@ -62,7 +62,7 @@ extension JTAppleCalendarView { break } - let section = CGFloat(Int(theTargetContentOffset / fixedScrollSize)) + let section = CGFloat(round(theTargetContentOffset / fixedScrollSize)) let destinationRectOffset = (fixedScrollSize * section) var x: CGFloat = 0 var y: CGFloat = 0