• Jean-Baptiste Louazel

    Thank you. Your explanations are very clear. That helped me a lot.

    • @jeanbaptistelouazel:disqus You are most welcome 🙂

  • GöktuÄź Yılmaz

    Here is a good repo for this:

    https://github.com/goktugyil/EZSwipeController

  • Thanks for the video, it was very helpful. I had to change one line possibly due to a new version of Swift.

    self.pageViewController.setViewControllers(viewControllers as [AnyObject], direction: UIPageViewControllerNavigationDirection.Forward, animated: true, completion: nil)

    to:

    self.pageViewController.setViewControllers(viewControllers as? [UIViewController], direction: UIPageViewControllerNavigationDirection.Forward, animated: true, completion: nil)

    • Adam, I am glad it eventually worked! Thank you very much for sharing your code.

  • Goncalo Girao

    Can you help me to do the opposite? I have several view controllers and one pageviewcontroller. I could create this pageview, but now app starts on this one and that’s not what I intend to do. TY

    • sorry, I did not get exactly what you need. Can you explain further?

      • Goncalo Girao

        This tutorial explains how to create a (root view) with PageViewController. I’m creating an app that has several “normal” views and somewhere inside I have a PageViewController. The problem is that the App is starting on the PageViewController instead of normal workflow

        • I see.. Do you know how to make selected view controller on Main.storyboard as Initial View Controller? This is make your app start with that initial view controller. And whenever PageViewController is needed you can then present it to user upon request. Do you know how to presentViewController?

          • Goncalo Girao

            First i Thank you for yor help. Yes I know how to set initial view controller, but dont how to call the pageviewcontroller upon request.

          • You can do it through the widow’s rootViewController. For example if you in AppDelegate you can set a different viewController like this:
            window?.rootViewController = myPageViewController
            If you are on any other view controller than AppDelegate you can first access AppDelegate and then access window object, like so:
            let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate

            appDelegate.window?.rootViewController = myPageViewController