From 1c7e9bc9b516c22f6362818a1813d98c9aff744e Mon Sep 17 00:00:00 2001 From: Hiroshi Kimura Date: Mon, 24 Jun 2024 14:21:40 +0900 Subject: [PATCH] Fix hiding offset calc (#59) --- Rideau/Core/RideauHostingView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Rideau/Core/RideauHostingView.swift b/Rideau/Core/RideauHostingView.swift index 69215b5..3f0612f 100644 --- a/Rideau/Core/RideauHostingView.swift +++ b/Rideau/Core/RideauHostingView.swift @@ -425,7 +425,7 @@ final class RideauHostingView: RideauTouchThroughView { func currentHidingOffset() -> CGFloat { - let offset = actualTopMargin + let offset = actualTopMargin.rounded() var nextValue: CGFloat if let v = containerView.layer.presentation().map({ $0.frame.origin.y }) { @@ -434,6 +434,8 @@ final class RideauHostingView: RideauTouchThroughView { nextValue = containerView.frame.origin.y } + nextValue.round() + nextValue -= offset return nextValue