fix to always update lastContentOffset when scrolling

This commit is contained in:
d wat 2017-04-29 10:40:55 +09:00
parent 4f2d9d9838
commit ccb76e2fa7
1 changed files with 1 additions and 1 deletions

View File

@ -305,13 +305,13 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
open func scrollViewDidScroll(_ scrollView: UIScrollView) {
if containerView == scrollView {
updateContent()
lastContentOffset = scrollView.contentOffset.x
}
}
open func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
if containerView == scrollView {
lastPageNumber = pageFor(contentOffset: scrollView.contentOffset.x)
lastContentOffset = scrollView.contentOffset.x
}
}