title: present walkthrough scenes only once ios swift
body: <p>I created a PageViewController and added three view controllers as a walkthrough for my app, but i want them to be displayed only once, and i can't figure out how.</p>
  
  <p>here is my code for the pageViewController:</p>
  
  <pre><code>import UIKit
  
  class MyPageViewController: UIPageViewController{
  
  override func viewDidLoad() {
      super.viewDidLoad()
    dataSource = self
      // Do any additional setup after loading the view.
      if let firstViewController = orderedViewControllers.first {
          setViewControllers([firstViewController],
                             direction: .Forward,
                             animated: true,
                             completion: nil)
      }
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  //array for the ordered view controllers
  private(set) lazy var orderedViewControllers: [UIViewController] = {
      return [self.newColoredViewController("First"),
              self.newColoredViewController("Second"),
              self.newColoredViewController("Third")]
  }()
  
  private func newColoredViewController(color: String) -&gt; UIViewController {
      return UIStoryboard(name: "Main", bundle: nil) .
          instantiateViewControllerWithIdentifier("\(color)ViewController")
  }
  
  }
  
   extension MyPageViewController: UIPageViewControllerDataSource {
  //returning index of previous view controller
  func pageViewController(pageViewController: UIPageViewController,
                          viewControllerBeforeViewController viewController: UIViewController) -&gt; UIViewController? {
      guard let viewControllerIndex = orderedViewControllers.indexOf(viewController) else {
          return nil
      }
  
      let previousIndex = viewControllerIndex - 1
  
      guard previousIndex &gt;= 0 else {
          return nil
      }
  
      guard orderedViewControllers.count &gt; previousIndex else {
          return nil
      }
  
      return orderedViewControllers[previousIndex]
  }
  //returning index of the next view controller
  func pageViewController(pageViewController: UIPageViewController,
                          viewControllerAfterViewController viewController: UIViewController) -&gt; UIViewController? {
      guard let viewControllerIndex = orderedViewControllers.indexOf(viewController) else {
          return nil
      }
  
      let nextIndex = viewControllerIndex + 1
      let orderedViewControllersCount = orderedViewControllers.count
  
      guard orderedViewControllersCount != nextIndex else {
          return nil
      }
  
      guard orderedViewControllersCount &gt; nextIndex else {
          return nil
      }
  
      return orderedViewControllers[nextIndex]
  }
  
  }
  </code></pre>
  
  <p>how do i edit the code to display it only once?</p>