Search code examples
iosswipeuipageviewcontroller

UIPageViewController with a last view without page indicator


I would like to have 4 views that the user can swipe left or right. For this I am planning to use UIPageViewController.

What is special is that the last view should not have the page indicator at all. I would like to swipe it away with the view that is before the last one. Is this possible with UIPageViewController?

Here is a picture of a swipe moving to the last view:

enter image description here


Solution

  • I think that's impossible to achieve what you say with UIPageViewController. Because you can't get the value how far the current view is moved by now.

    To get that value you can custom a UIScrollView and animate the page indicator yourself in the delegate method - scrollViewDidScroll: