Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions PullToRefresh/PullToRefresh.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ extension PullToRefresh {
} else {
super.observeValue(forKeyPath: keyPath, of: object, change: change, context: context)
}
previousScrollViewOffset.y = scrollView?.normalizedContentOffset.y ?? 0
previousScrollViewOffset.y = scrollView?.contentOffset.y ?? 0
}

fileprivate func addScrollViewObserving() {
Expand Down Expand Up @@ -328,7 +328,7 @@ private extension PullToRefresh {
var isCurrentlyVisible: Bool {
guard let scrollView = scrollView else { return false }

return scrollView.normalizedContentOffset.y <= -scrollViewDefaultInsets.top
return scrollView.normalizedContentOffset.y <= 0
}

func bringRefreshViewToSuperview() {
Expand Down