拍照后没有执行我的检定

我正在开发一个使用摄像头的应用程序,然后应该将照片发送到另一个ViewController,但是我不确定是否segue不能在那里执行或只能执行,但是何时我确认我的应用崩溃了,照片也没有错误记录。

这是相机的View控制器

import UIKit
import AVFoundation
class ViewController: UIViewController , 
UIImagePickerControllerDelegate, UINavigationControllerDelegate{

var img = UIImageView()

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
}

@IBAction func photo(_ sender: Any) {
    checkCameraPermissions()
}


private func checkCameraPermissions() {
    let status = AVCaptureDevice.authorizationStatus(for: .video)
    switch status {
    case .authorized:
        print("1")
        presentPicker()
    case .notDetermined:
        print("2")
        askPermision()
    case .denied:
        print("3")
        // user denied access
        self.permissionDenied()
    case .restricted:
        print("Error restricted")
    }
}

private func presentPicker() {
    if UIImagePickerController.isSourceTypeAvailable(UIImagePickerController.SourceType.camera) {
        let imagePicker = UIImagePickerController()
        imagePicker.delegate = self
        imagePicker.sourceType = UIImagePickerController.SourceType.camera
        imagePicker.allowsEditing = false
        self.present(imagePicker, animated: true, completion: nil)
    }


}

func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
    if let pickedImage = info[UIImagePickerController.InfoKey.originalImage] as? UIImage{
        img.image = pickedImage
    }
    performSegue(withIdentifier: "captured", sender: nil)

}

private func askPermision(){
    AVCaptureDevice.requestAccess(for: AVMediaType.video) {granted in
        if granted {
            self.presentPicker()
        } else {
            print("Denied")
        }
    }
}

private func permissionDenied() {
    let alert = UIAlertController(title: "Access to camera is denied", message: "You have denied the access to the camera. Would you like to able it?", preferredStyle: .alert)
    let actionOK = UIAlertAction(title: "Ok", style: .default) { (UIAlertAction) in
        self.askPermision()
    }
    let cancel = UIAlertAction(title: "Cancel", style: .default) { (action) in
        print("Cancel")
    }
    alert.addAction(actionOK)
    alert.addAction(cancel)
    present(alert, animated : true, completion: nil)
}

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if(segue.identifier == "captured"){
        let vc = segue.destination as! ImageReportedVC
        vc.imgAux = img.image!
    }
}
}

然后,这是第二个VC,它没有出现。我认为不应在那儿或其他事情上执行segue,但是如果将其放在代码的另一部分中,则会在拍照之前执行它。

import UIKit

class ImageReportedVC: UIViewController {

var imgAux = UIImage()


@IBOutlet weak var imgReported: UIImageView!
override func viewDidLoad() {
    super.viewDidLoad()

    imgReported.image = imgAux
    // Do any additional setup after loading the view.
}



 }

谢谢