0
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 
    if segue.identifier == "stopRecording" {             
        let playSoundsVC = segue.destination as! PlaySoundsViewController          
        let recordedAudioURL = sender as! URL           
        playSoundsVC.receivedAudio = recordedAudioURL               
    }
}

The question is that my Xcode generating error

Value of type 'PlaySoundsViewController' has no member 'receivedAudio'

Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87

1 Answers1

1

For this to work the destinationVC should look like this

class PlaySoundsViewController:UIViewController {

    var receivedAudio:URL?

    .....
 }
Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87