Fix toolbars disappearing when tapping screen while scrolling
This commit is contained in:
parent
f2b78d676f
commit
43b105c85e
|
@ -332,13 +332,11 @@ extension BrowserNavigationController: UIScrollViewDelegate {
|
||||||
guard trackingScroll else { return }
|
guard trackingScroll else { return }
|
||||||
trackingScroll = false
|
trackingScroll = false
|
||||||
|
|
||||||
let finalOffset: CGFloat
|
if velocity.y == 0 {
|
||||||
if velocity.y < 0 {
|
return
|
||||||
finalOffset = 0
|
|
||||||
} else {
|
|
||||||
finalOffset = 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let finalOffset: CGFloat = velocity.y < 0 ? 0 : 1
|
||||||
UIView.animate(withDuration: 0.15, delay: 0, options: .curveEaseOut) {
|
UIView.animate(withDuration: 0.15, delay: 0, options: .curveEaseOut) {
|
||||||
self.toolbarOffset = finalOffset
|
self.toolbarOffset = finalOffset
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue