I have four pages in a UIPageViewController, and I\'d like to hide the dots on the last page. I successfully made a function that gets called on the last page of the UIPageV
use the UIPageViewControllerDelegate method:
let pageControl = UIPageControl()
func pageViewController(pageViewController: UIPageViewController, didFinishAnimating finished: Bool, previousViewControllers: [UIViewController], transitionCompleted completed: Bool) {
if (index == numberOfPages()-1){
pageControl.hidden = true
}else{
pageControl.hidden = false
}
}