Reputation: 1748
Is there a way to prevent swiping to one specific page in UIPageViewController
In my case, I need the left page just to be accessible sometimes,
Thanks!
Upvotes: 1
Views: 128
Reputation: 131408
No.
You will need to set up your page view controller without the page in question, and then add it when you want it to be available.
I would suggest changing your design. Page view controllers aren't intended to handle a case where the set of pages displayed changes. The real world analogy is a book where a page appears sometimes and not others. It doesn't make sense.
Instead you might want to present a modal view controller when you want this special-case VC to be available.
Upvotes: 1