Changes

Jump to: navigation, search
The UIPageViewController DataSource
In order to function, a UIPageViewController instance must be assigned a data source which, in turn, is responsible for providing view controller objects as required for each page. The data source takes the form of a class instance that implements the <UIPageViewControllerDataSource> protocol which, at a minimum, must implement the following two methods:
* '''viewControllerAfterViewController: ''' - This method is passed a view controller representing the currently displayed page and is required to return the view controller corresponding to the next page in the paging sequence.
* '''viewControllerBeforeViewController: ''' - This method is passed the view controller representing the currently displayed page and is required to return the view controller corresponding to the previous page in the paging sequence.
The mechanism used to create the requested view controllers and the content therein will generally be application specific and is at the discretion of the developer. Apple does, however, recommend that in order to ensure optimal performance and minimal resource usage, the view controllers be created on an as-needed basis rather than pre-created.

Navigation menu