Esqarrouth / EZSwipeController

:point_up_2: UIPageViewController like Snapchat/Tinder/iOS Main Pages
MIT License
842 stars 71 forks source link

PageControl not showing dots #23

Closed cacalialia closed 8 years ago

cacalialia commented 8 years ago

Hi,

can you give an advice how to implement PageControl to show witch page is opened? I have tried to add pageControl configuration the by adding this code in AppDelegate.swift file

let pageController = UIPageControl.appearance()
pageController.pageIndicatorTintColor = UIColor.lightGrayColor()
pageController.currentPageIndicatorTintColor = UIColor.yellowColor()
pageController.backgroundColor = UIColor.whiteColor()

but no success

cacalialia commented 8 years ago

I have found the solution by my self. Two methods was needed:

func presentationCountForPageViewController(pageViewController: UIPageViewController) -> Int {
        return pages.count
}  

func presentationIndexForPageViewController(pageViewController: UIPageViewController) -> Int {
        return 0
}
Esqarrouth commented 8 years ago

https://github.com/goktugyil/EZSwipeController#extra-settings