title: Swift 3 - Unable to pass image from one viewcontroller to second
body: <p>i am trying to pass an image from 1st <code>UIViewController</code> to 2nd <code>UIViewControlleler</code> by prepareforSegue</p>
  
  <p>my code :-</p>
  
  <pre><code>extension ViewController:UIImagePickerControllerDelegate,UINavigationControllerDelegate {
  func handleImg() {
      let picker = UIImagePickerController()
      picker.delegate = self
      picker.allowsEditing = true
      present(picker, animated: true, completion: nil)
  }
  func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
      var selectedImageFromPicer : UIImage?
      if let editedImage = info["UIImagePickerControllerEditedImage"] as? UIImage {
          selectedImageFromPicer = editedImage
      } else if let originalImage = info["UIImagePickerControllerOriginalImage"] as? UIImage {
  
          selectedImageFromPicer = originalImage
      }
  
      if let selectedImage = selectedImageFromPicer {
          imgg.image = selectedImage  
      }
      guard let imageUrl = info["UIImagePickerControllerImageURL"] as? URL else {
          return
      }
      self.performSegue(withIdentifier: "selected", sender: self)
      func imagePickerControllerDidCancel(_ picker: UIImagePickerController) {
          print("canceled picker")
          dismiss(animated: true, completion: nil)
      }
  }
  override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
      if segue.identifier == "selected" {
          let vc = segue.destination as! secondVC
          vc.img.image = self.imgg.image
  
      }
  }
  </code></pre>
  
  <p>i am getting the error on line <code>vc.img.image = self.imgg.image</code> </p>
  
  <p>Error </p>
  
  <blockquote>
    <p>fatal error: unexpectedly found nil while unwrapping an Optional value</p>
  </blockquote>