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 {
|
||||
case .began:
|
||||
scrollView.bounces = false
|
||||
scrollViewIsMovingSheet = shouldMoveSheet
|
||||
if shouldMoveSheet {
|
||||
scrollView.bounces = false
|
||||
initialScrollViewContentOffset = scrollView.contentOffset
|
||||
}
|
||||
|
||||
|
@ -167,8 +167,8 @@ open class SheetContainerViewController: UIViewController {
|
|||
}
|
||||
|
||||
case .ended:
|
||||
scrollView.bounces = true
|
||||
if scrollViewIsMovingSheet {
|
||||
scrollView.bounces = true
|
||||
scrollView.setContentOffset(initialScrollViewContentOffset!, animated: false)
|
||||
springToNearestDetent(verticalVelocity: velocity.y)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue