title: Show and Hide UIView on swipe without IF statement?
body: <p>I have the following code to scroll through UIViews on swipe.</p>
  
  <p>My question is, is there a better way of running through each of the views rather than having an if statement?
  As I feel the will get even bigger if I add any more view layers.</p>
  
  <p>Or is there a way of me getting the current views id/model/IBOutlet as I feel I could resolve the issue with this.</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
  
      @IBOutlet weak var WalkthroughScreen1: UIView!
      @IBOutlet weak var WalkthroughScreen2: UIView!
      @IBOutlet weak var WalkthroughScreen3: UIView!
      @IBOutlet weak var WalkthroughScreen4: UIView!
  
      override func viewDidLoad() {
          super.viewDidLoad()
          WalkthroughScreen1.isHidden = false
          WalkthroughScreen2.isHidden = true
          WalkthroughScreen3.isHidden = true
          WalkthroughScreen4.isHidden = true
          // Do any additional setup after loading the view, typically from a nib.
      }
  
      @IBAction func SwipeLeft(_ sender: UISwipeGestureRecognizer) {
          if WalkthroughScreen1.isHidden == false {
              WalkthroughScreen1.isHidden = true
              WalkthroughScreen2.isHidden = false
          } else {
              if WalkthroughScreen2.isHidden == false {
                  WalkthroughScreen2.isHidden = true
                  WalkthroughScreen3.isHidden = false
              } else {
                  if WalkthroughScreen3.isHidden == false {
                      WalkthroughScreen3.isHidden = true
                      WalkthroughScreen4.isHidden = false
                  }
              }
          }
      }
  
      @IBAction func SwipeRight(_ sender: UISwipeGestureRecognizer) {
          if WalkthroughScreen4.isHidden == false {
              WalkthroughScreen4.isHidden = true
              WalkthroughScreen3.isHidden = false
          } else {
              if WalkthroughScreen3.isHidden == false {
                  WalkthroughScreen3.isHidden = true
                  WalkthroughScreen2.isHidden = false
              } else {
                  if WalkthroughScreen2.isHidden == false {
                      WalkthroughScreen2.isHidden = true
                      WalkthroughScreen1.isHidden = false
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>Thank you in advance for your help.</p>