From 7a10ee5c5f2de5098c0f376f9012fd24baa0cad9 Mon Sep 17 00:00:00 2001 From: Vadym Markov Date: Tue, 26 Nov 2019 16:27:03 +0100 Subject: [PATCH] Add rubber band effect to the bottom target --- Sources/BottomSheetCalculator.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/BottomSheetCalculator.swift b/Sources/BottomSheetCalculator.swift index a1b900b..c4f96f4 100644 --- a/Sources/BottomSheetCalculator.swift +++ b/Sources/BottomSheetCalculator.swift @@ -78,7 +78,7 @@ struct BottomSheetCalculator { let bottomTarget = LimitTarget( targetOffset: isDismissible ? superview.frame.height : maxOffset, bound: bounds.first ?? maxOffset, - behavior: isDismissible ? .linear : .stop, + behavior: isDismissible ? .linear : .rubberBand(radius: threshold(0, maxOffset)), isDismissible: isDismissible, compare: >= )