fix: protocols

This commit is contained in:
Boyko Mihail 2021-06-04 20:35:28 +03:00
parent cf81e228ef
commit 2bd3144922
2 changed files with 5 additions and 3 deletions

View File

@ -54,7 +54,9 @@ open class HeaderTransitionDelegate: NSObject, UIScrollViewDelegate {
}
if isFirstScroll {
startOffset = headerViewHandler?.startOffset ?? 0
startOffset = max(-(headerViewHandler?.startOffset.y ?? 0), 0)
navigationBarOffset = headerViewHandler?.navigationBarOffset ?? 0
isFirstScroll = false
}

View File

@ -5,7 +5,7 @@ public protocol TableViewHandler {
}
extension TableViewHandler {
var startOffset: CGFloat {
max(-(tableView.contentOffset.y), 0)
var startOffset: CGPoint {
tableView.contentOffset
}
}