Merge pull request #360 from kurebio/fix-scroll-direction

fix to always update lastContentOffset when scrolling
This commit is contained in:
pera 2017-05-03 17:05:44 -03:00 committed by GitHub
commit 7ff9ed7554
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
}
}