title: Select multiple images and display them in image views
body: <p>I am trying to choose and display multiple images (approx. 5 images) but for some reason I am only able to select and display a single image at a time. I have tried to implement the below code for displaying multiple images. Please help guys. Thanks in advance.</p>
  
  <pre><code>import UIKit
  import Alamofire
  
  class ViewController: UIViewController, UINavigationControllerDelegate, UIImagePickerControllerDelegate  {
  
      let imagesData = [UIImage]()
  
      @IBOutlet weak var myImageView: UIImageView!
      @IBOutlet weak var myImageView1: UIImageView!
      @IBOutlet weak var myImageView2: UIImageView!
      @IBOutlet weak var myImageView3: UIImageView!
      @IBOutlet weak var myImageView4: UIImageView!
  
      override func viewDidLoad() {
          super.viewDidLoad()
          myImageView.backgroundColor =  #colorLiteral(red: 0.6000000238, green: 0.6000000238, blue: 0.6000000238, alpha: 1)
          myImageView1.backgroundColor = #colorLiteral(red: 0.1764705926, green: 0.4980392158, blue: 0.7568627596, alpha: 1)
          myImageView2.backgroundColor = #colorLiteral(red: 0.06274510175, green: 0, blue: 0.1921568662, alpha: 1)
          myImageView3.backgroundColor = #colorLiteral(red: 0.5791940689, green: 0.1280144453, blue: 0.5726861358, alpha: 1)
          myImageView4.backgroundColor = #colorLiteral(red: 0.9254902005, green: 0.2352941185, blue: 0.1019607857, alpha: 1)
      }
  
      func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
          dismiss(animated: true, completion: nil)
      }
  
      func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
          let image = info[UIImagePickerControllerOriginalImage] as! UIImage
  
          myImageView.image = image
          myImageView.contentMode = .scaleAspectFill
          myImageView1.image = image
          myImageView1.contentMode = .scaleAspectFill
          myImageView2.image = image
          myImageView2.contentMode = .scaleAspectFill
          myImageView3.image = image
          myImageView3.contentMode = .scaleAspectFill
          myImageView4.image = image
          myImageView4.contentMode = .scaleAspectFill
          dismiss(animated: true, completion: nil)
      }
  
      override func touchesBegan(_ touches: Set&lt;UITouch&gt;, with event: UIEvent?) {
          let controller = UIImagePickerController()
          controller.delegate = self
          controller.sourceType = .photoLibrary
          present(controller, animated: true, completion: nil)
      }
  }
  </code></pre>