Méthode déléguée UIVideoEditorController appelée deux fois
J'utilise UIVideoEditorController, mais la méthode de délégation de succès a appelé deux fois pour moi. Cependant, tous les pointeurs de tous les objets passés indiquent qu'il envoie exactement les mêmes données. let editor = UIVideoEditorController() editor.videoMaximumDuration = 10.0 editor.videoQuality =.typeIFrame1280x720 editor.delegate = self editor.videoPath = // some path goes here self.present(editor, animated: true, completion: nil) Et puis la méthode suivante imprime "ici" 2 fois. func videoEditorController(_ editor: UIVideoEditorController, didSaveEditedVideoToPath editedVideoPath: String) { print("here") self.dismiss(animated: true, completion: nil) } Solution du problème func videoEditorController(_ editor: UIVideoEditorController, didSaveEditedVideoToPath editedVideoPath: String) { editor.delegate = nil editor.dismiss(animated: true) }