Created
January 18, 2017 08:05
-
-
Save leoiphonedev/59b215ef66cedde4e328aa2f5617fab6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func scrollViewDidEndDecelerating(scrollView: UIScrollView) { | |
setIndiactorForCurrentPage() | |
} | |
func setIndiactorForCurrentPage() { | |
let page = (scrollView?.contentOffset.x)!/scrollWidth | |
pageControl?.currentPage = Int(page) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment