Allow scroll view to bounce while scrolled all the way down
This commit is contained in:
parent
78385359e1
commit
6ee1ad24ec
|
@ -143,9 +143,9 @@ open class SheetContainerViewController: UIViewController {
|
||||||
|
|
||||||
switch recognizer.state {
|
switch recognizer.state {
|
||||||
case .began:
|
case .began:
|
||||||
scrollView.bounces = false
|
|
||||||
scrollViewIsMovingSheet = shouldMoveSheet
|
scrollViewIsMovingSheet = shouldMoveSheet
|
||||||
if shouldMoveSheet {
|
if shouldMoveSheet {
|
||||||
|
scrollView.bounces = false
|
||||||
initialScrollViewContentOffset = scrollView.contentOffset
|
initialScrollViewContentOffset = scrollView.contentOffset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,8 +167,8 @@ open class SheetContainerViewController: UIViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
case .ended:
|
case .ended:
|
||||||
scrollView.bounces = true
|
|
||||||
if scrollViewIsMovingSheet {
|
if scrollViewIsMovingSheet {
|
||||||
|
scrollView.bounces = true
|
||||||
scrollView.setContentOffset(initialScrollViewContentOffset!, animated: false)
|
scrollView.setContentOffset(initialScrollViewContentOffset!, animated: false)
|
||||||
springToNearestDetent(verticalVelocity: velocity.y)
|
springToNearestDetent(verticalVelocity: velocity.y)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue