Hide dots on final page of UIPageViewController swift

后端 未结 5 1652
小鲜肉
小鲜肉 2021-01-16 08:59

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

5条回答
  •  渐次进展
    2021-01-16 09:43

    override func presentationCountForPageViewController(pageViewController: UIPageViewController) -> Int {
        if /*current index is the last one*/ {
            return 0
        } else {
            /*return number of pages*/
        }
    }
    

提交回复
热议问题