Appgix Appgix - 2 years ago 144
iOS Question

How delete Pages in UIPageViewController?

Is it possible to delete multiple or all pages in the


In my situation I navigate back to the
after deleting some pages/entries and I want to set only one already created Page.

I can't create all pages and save their references because of the big number of pages.

Answer Source

There is nothing to delete. A UIPageViewController doesn't have any pages other than the one whose view is showing right now. It merely calls its data source asking for the next or previous page. If you don't want the user to be able to navigate to any other pages, don't supply a next or previous page: return nil from those data source methods.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download