

These will be used in code to instantiate the view controllers. Planning ahead a bit, let’s set Storyboard IDs in the identity inspector for each of the view controllers above. Now for the fun part–let’s create three view controller objects in Main.storyboard. These will eventually be scrolled through in the page view controller. …and assign it to the UIPageViewController object (which we created inside Main.storyboard earlier) in the identity inspector. Next, let’s create a custom UIPageViewController subclass… That way, it will be initialized when the app launches. Make sure to set the new UIPageViewController object as the initial view controller in the attributes inspector. Next, inside Main.storyboard, add a new Page View Controller object to the canvas.

If you did everything right, building the project ( Cmd + b) should succeed. Now remove all of the objects in Main.storyboard.

Remove all of the auto-generated files besides the ones listed. Select a product name and be sure to select Swift for the language. It doesn’t matter which type you select, since we’re going to start with a clean slate anyway. To start, let’s create a new application. In this post, I will show you how incredibly easy it is to make a UIPageViewController tutorial. Many apps use it for feature lists and/or tips on getting started. UIPageViewController is a powerful class used by nine out of ten of the mobile apps you will ever come across.
