Skip to content

Commit ccb76e2

Browse files
d watd wat
authored andcommitted
fix to always update lastContentOffset when scrolling
1 parent 4f2d9d9 commit ccb76e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/PagerTabStripViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,13 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
305305
open func scrollViewDidScroll(_ scrollView: UIScrollView) {
306306
if containerView == scrollView {
307307
updateContent()
308+
lastContentOffset = scrollView.contentOffset.x
308309
}
309310
}
310311

311312
open func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
312313
if containerView == scrollView {
313314
lastPageNumber = pageFor(contentOffset: scrollView.contentOffset.x)
314-
lastContentOffset = scrollView.contentOffset.x
315315
}
316316
}
317317

0 commit comments

Comments
 (0)