title: Swift 2.0 - Using a gesture swipe to cycle through 5 images in an array
body: <p>I'm new to Swift and programming in general and to stackoverflow.</p>
  
  <p>I have an array of 5 images that I want to cycle through with a gesture swipe.  Starting with the first one, ending on the fifth one and then having it just return to the first one again with the ability to just keep cycling through 1-5 over and over and over again.</p>
  
  <p>Right now with help of google and tutorials I have gesture swipe working, and I have it displaying one of those images randomly with each swipe.</p>
  
  <p>Here's an example of the lines making the image change randomly using gesture swipe:</p>
  
  <pre><code>//placed under class ViewController: UIViewController
  
  @IBOutlet weak var picture: UIImageView!
  
  var myArray:[String] = ["img1", "img2", "img3", "img4", "img5"]
  
  //placed under override func didReceiveMemoryWarning() &amp; super...()
  
  @IBAction func pictureSwipe(sender: UISwipeGestureRecognizer) {
     let pictureRandom:Int = Int(arc4random_uniform(5))
     let pictureString:String = self.myArray[pictureRandom]
     self.picture.image = UIImage(named: pictureString)
  
  }
  </code></pre>
  
  <p>Even if somebody could kind of point me in the right direction.  This code works but I don't want random images.  I am looking for it to cycle through "img1" thru to "img5" and start all over again if the user continues swiping.  Any help or guidance is greatly appreciated.</p>
  
  <p>Thank you</p>