title: How do I populate my imageViews with different images from my imageArray instead of setting the same image for each imageView?
body: <p>I basically have 2 view controllers: a camera view controller and a detail view controller. Each time I take a picture, I want to add it to my detail view controller, which can hold up to 4 imageViews. Below is my code for the detail view controller.  </p>
  
  <p>My images are added to my imageArray and I am trying to distribute them to my 4 imageViews, as displayed below. What is hapening is that the same image from the image array is being set to all 4 imageViews (as each imageView.image == nil). Does anyone know how to change this so that each imageView is populated by the next image in the imageArray?</p>
  
  <pre><code>  override func viewWillAppear(animated: Bool) {
  
      for img in imageArray {
          if imageArray.count &lt; imageViewArray.count || imageArray.count == imageViewArray.count {
              for imgV in imageViewArray {
                  if imgV.image == nil {
                      imgV.image = img
                  }
              }
      }
      }
  
  }
  }
  </code></pre>