title: PageViewController with Navigation Controllers Inside
body: <p>I have a pageviewcontroller that I want to have multiple navigation controllers in. I keep the error type HomeViewController does not conform to UIPageViewController DataSource.</p>
  
  <pre><code>import UIKit
  import Firebase
  import FirebaseAuth
  
  class HomeViewController: UIPageViewController, UIPageViewControllerDataSource {
      let dropDownLauncher = DropDownLauncher()
          override func viewDidLoad() {
              super.viewDidLoad()
              self.dataSource = self
              if let firstViewController = viewControllerList.first{
                  self.setViewControllers([firstViewController], direction: .forward, animated: true, completion: nil)
              }
              // setupView()
          }
      lazy var viewControllerList: [UINavigationController] = {
          let layout = UICollectionViewFlowLayout()
          let homeFeedController = HomeFeedController(collectionViewLayout: layout)
          let navController = UINavigationController(rootViewController: homeFeedController)
          let profileView = ProfileeViewController(collectionViewLayout: layout)
          let profileViewNavController = UINavigationController(rootViewController: profileView)
          let searchController = EventSearchController(collectionViewLayout: layout)
          let searchNavController = UINavigationController(rootViewController: searchController)
  
          return [navController,profileViewNavController,searchNavController]
      }()
  
      func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UINavigationController) -&gt; UINavigationController? {
          guard let vcIndex = viewControllerList.index(of: viewController) else{
              return nil
          }
          let previousIndex = vcIndex - 1
          guard previousIndex &gt;= 0 else {
              return nil
          }
          guard viewControllerList.count &gt; previousIndex else{
              return nil
          }
          return viewControllerList[previousIndex]
      }
  
      func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UINavigationController) -&gt; UINavigationController? {
  
          guard let vcIndex = viewControllerList.index(of: viewController) else{
              return nil
          }
          let nextIndex = vcIndex + 1
          guard viewControllerList.count != nextIndex else{
              return nil
          }
          guard viewControllerList.count &gt; nextIndex else{
              return nil
          }
  
          return viewControllerList[nextIndex]
          }
  
  }
  </code></pre>
  
  <p>So my question is.
  Is there a way to effectively do this and remove this error?
  Is there a way to control which view controller appears in what order?
  Becuase there is a certain order in which I want them to appear</p>