title: Pass image from one view controller to another controller gives nil
body: <p>I am trying to send an image to the <strong>preview controller</strong> as shown below. My issue is that in the <strong>preview controller</strong> <code>newImage</code> is <code>nil</code></p>
  
  <p>Below is the code:</p>
  
  <p><strong>FirstViewController</strong></p>
  
  <pre><code>override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
      print("In here")
      if segue.identifier == "showImage" {
  
          let secondViewController = self.storyboard!.instantiateViewController(withIdentifier: "showImage") as! showImageController
  
          secondViewController.newImage =  UIImage(named: imageArray[0])
  
      }
  }
  </code></pre>
  
  <p><strong>PreviewController</strong></p>
  
  <pre><code>@IBOutlet weak var imageHolder: UIImageView!
  var newImage: UIImage!
  
  override func viewDidLoad() {
      super.viewDidLoad()
      imageHolder.image = newImage
      // Do any additional setup after loading the view.
  }
  </code></pre>