Hide dots on final page of UIPageViewController swift

后端 未结 5 1661
小鲜肉
小鲜肉 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:19

    Check out the accepted answer here to get the UIPageControl (the view with the dots):

    Access the UIPageControl created by iOS6 UIPageViewController?

    Then, once you have the pageControl, in pageViewController: didFinishAnimating: you can check if it's the last page, and if so set pageControl.hidden = true.

提交回复
热议问题